Sometimes it's also helpful to use beautiful soup to isolate the elements you want, feed the text of the elements into StringIO and give that to read_html.
Yes, this is a good idea for more complicated cases.
Re:Web Scraping 101 with Python
by mritchie712 on Friday February 12, 2021 @08:55AM
(#26113634)
We made a chrome extension that queries any html table in any open tab with SQL:
https://chrome.google.com/webstore/detail/sqanything/naejbcf...
You can export the results to Google Sheets too. One advantage of the extension is it works with JS rendered tables.
Handy! I'm also a big fan of pd.read_clipboard() for specific selections.
Re:Web Scraping 101 with Python
by antisthenes on Wednesday February 10, 2021 @08:00PM
(#26096947)
Holy crap, is there anything pandas can't do?
Ingest bamboo? Sorry, couldn't resist.
Re:Web Scraping 101 with Python
by JosephRedfern on Wednesday February 10, 2021 @03:50PM
(#26094578)
Woah. I’ve used pandas a fair amount and had no idea about this. Thank you!
+1 this has saved me countless of hours
Re:Web Scraping 101 with Python
by mikesholiu on Wednesday February 10, 2021 @01:57PM
(#26093264)
what does this do
Re:Web Scraping 101 with Python
by SirSourdough on Wednesday February 10, 2021 @02:18PM
(#26093461)
It reads HTML and returns the tables contained in the HTML as pandas dataframes. It’s a simple way to scrape tabular data from websites.
https://pandas.pydata.org/pandas-docs/stable/reference/api/p...