Pandas already has a built-in method to convert the table on the web to a dataframe:
table = soup.find_all('table')
df = pd.read_html(str(table))[0]
Pandas already has a built-in method to convert the table on the web to a dataframe:
table = soup.find_all('table')
df = pd.read_html(str(table))[0]