Skip to content
Advertisement

pandas read_html – no tables found

I am attempting to see if I can read a table of data from WU.com, but I am getting a type error for no tables found. (first timer on web scraping too here) There is also another person with a very similar stackoverflow question here with WU table of data, but the solution is a little bit complicated to me.

JavaScript

On the webpage of historical data for Milwaukee, this is the table of data (daily observations) that I am attempting to retrieve into Pandas: enter image description here

Any tips help, thank you.

Advertisement

Answer

the page is dynamic which means you’ll need to to render the page first. So you would need to use something like Selenium to render the page, then you can pull the table using pandas .read_html():

JavaScript

Output:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement