Pandas Load HTML
Scrape the tables out of an HTML page, up to ten at a time
- Number of DataFrames
- DataFrame1
- DataFrame2
- DataFrame3
- DataFrame4
- DataFrame5
- DataFrame6
- DataFrame7
- DataFrame8
- DataFrame9
- DataFrame10
Web pages are full of tables - leaderboards, price lists, stats pages - and PandasLoadHTML is the node that pulls them out. Point it at an HTML file or a URL, and it finds every <table> on the page, turns each one into a DataFrame, and hands them all to you. It's the scraper that requires no scraping skills, and it's the quirkiest node in the pack - partly because it's genuinely useful and partly because of how its outputs work.
It's part of HowToSD's ComfyUI-Data-Analysis pack, Hide Inada's pandas/matplotlib/seaborn wrapper set for ComfyUI. No GPU, no models - but it needs the lxml package to do the parsing.
How it works
Under the hood it's pd.read_html(file_path, flavor="lxml"), which returns a list of DataFrames - one per table found on the page. ComfyUI nodes can't output a dynamic list cleanly, so the author did something pragmatic: the node has eleven fixed outputs. The first is Number of DataFrames (an INT telling you how many tables were actually found), and the next ten are DataFrame1 through DataFrame10. If the page has fewer than ten tables, the remaining outputs are empty DataFrames; if it has more, you get the first ten and the count tells you there's more you can't reach.
That's the thing to internalize: check the count first, then read the matching DataFrame output. Wiring DataFrame7 when the page only has three tables gives you an empty table, not an error.
The file_path input accepts a local file path or a URL. The author's docstring adds a fair warning: when loading from a URL, additional cleanup is usually required - real web pages are messy.
The inputs that matter
- file_path - an HTML file path or a URL.
Outputs: Number of DataFrames (INT), then DataFrame1–10 (DATAFRAME, empties padding the unused slots).
Installing it
Standard pack install. ComfyUI Manager: search "ComfyUI-Data-Analysis", install, restart - lxml and friends are installed automatically. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/HowToSD/ComfyUI-Data-Analysis.git
pip install -r requirements.txt
Rename the folder to data-analysis for the example workflows. License: custom non-commercial - personal and academic use is fine, commercial use needs the author's written permission.
Gotchas
Expect mess. pd.read_html assumes well-formed tables with real headers, and the real web delivers none of that - a navigation table will come through as a "DataFrame" just as happily as the data table you actually wanted. That's why the count-and-pick workflow matters: scan the count, then check a couple of the outputs to find the real one. If loading a URL fails outright, it's usually a network issue or a page that's JavaScript-rendered - pandas only sees the raw HTML, so anything built client-side comes back empty. Save the page or use a static mirror for those. It's not a general-purpose crawler, but for "grab the tables off a stats page," it's shockingly effective.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| file_path | STRING | — |
Outputs (11)
| Name | Type | Description |
|---|---|---|
| Number of DataFrames | INT | — |
| DataFrame1 | DATAFRAME | — |
| DataFrame2 | DATAFRAME | — |
| DataFrame3 | DATAFRAME | — |
| DataFrame4 | DATAFRAME | — |
| DataFrame5 | DATAFRAME | — |
| DataFrame6 | DATAFRAME | — |
| DataFrame7 | DATAFRAME | — |
| DataFrame8 | DATAFRAME | — |
| DataFrame9 | DATAFRAME | — |
| DataFrame10 | DATAFRAME | — |