I am trying to load a wikipedia table into a pandas dataframe, but I keep receiving an error notification ''NoneType' object has no attribute 'items''. I believe Python is importing the data as a list instead of a dataframe, but when I run df = data[0], i figured that was extracting a df. I've tried a few ways, but going with the simple code for now:
url = 'http://en.wikipedia.org/wiki/List_of_postal_codes_of_Canada:_M'
data = pd.read_html(url)
df = data[0]
df
when I check the type of df, pandas tells me its a dataframe (pandas.core.frame.dataframe) I consistently receive the following error message: error message
Thanks in advance.. having a tough time with this