Last answered:

20 Nov 2023

Posted on:

28 Jul 2023

0

ValueError: No tables found

Hi. I run into a problem at line 17 (5:00) 

pd.read_html(base_site, attrs = {"class": "navbox"})

and line 18 (5:16)

pd.read_html(html, attrs = {"class": "wikitable sortable"})

Both lines produce this error:

ValueError: No tables found

Any help will be appreciated. Thanks

1 answers ( 0 marked as helpful)
Posted on:

20 Nov 2023

0

I checked the html file in Notepad++, and found that class names are different.


try this:


pd.read_html(base_site, attrs = {"class": "nowraplinks hlist mw-collapsible autocollapse navbox-inner"})

pd.read_html(html, attrs = {"class": "wikitable sortable static-row-numbers plainrowheaders srn-white-background"})

 

Submit an answer