I have been trying to import a html table from a website and to convert it into a pandas DataFrame. This is my code:
import pandas as pd
table = pd.read_html("http://www.sharesansar.com/c/today-share-price.html")
dfs = pd.DataFrame(data = table)
print dfs
It just displays this:
0 S.No ...
But if I do;
for df in dfs:
print df
It outputs the table..
How can I use pd.Dataframe to scrape the table?
