ComfyUI Node

Pandas Load CSV

Load a CSV into a DataFrame — the node most of this pack starts from

By HowToSD·Created 2 years ago·Updated about a year ago· 23
Pandas Load CSV
    • DATAFRAME
    file_path

    Every real analysis in this pack starts the same way: get a CSV off disk and into a DataFrame. PandasLoadCSV is that node. Type a file path, hit run, and out comes a DATAFRAME you can wire into any of the hundred-plus pandas nodes in HowToSD's ComfyUI-Data-Analysis pack. It's the on-ramp, and it's genuinely the first node you'll add to most workflows.

    The pack is Hide Inada's project to bolt pandas, matplotlib, and seaborn onto ComfyUI's node graph - the whole point being that ComfyUI is a great visual builder but has no native way to handle tabular data. This node is the front door to that idea. No GPU, no models.

    How it works

    Under the hood it's pd.read_csv(file_path) with the default settings, so you get pandas' standard inference: first row becomes the column names, a default 0-based index is assigned, and types are guessed per column. The one ComfyUI-specific behavior worth knowing: IS_CHANGED returns NaN, meaning this node re-reads the file on every run rather than caching. Edit the CSV in your editor, re-run, and the DataFrame reflects it - no cache-busting tricks needed.

    The path is a plain string. Per the pack's user guide, relative paths resolve against the ComfyUI installation directory - so either put your CSVs there or use an absolute path. That trips up more people than anything else with this node.

    The inputs that matter

    Just one: file_path - the CSV's location, relative to the ComfyUI folder or absolute.

    Output is a single DATAFRAME. From there the world opens up: filter, group, join, plot.

    Installing it

    Same install for the whole pack. ComfyUI Manager: search "ComfyUI-Data-Analysis", install, restart. Manager installs pandas, matplotlib, seaborn, scipy, scikit-learn, openpyxl, and lxml automatically. Manual route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/HowToSD/ComfyUI-Data-Analysis.git
    pip install -r requirements.txt
    

    Rename the cloned folder to data-analysis so the bundled example workflows - which load example CSVs - resolve their paths. And the pack-wide license note: custom non-commercial - personal and academic use is fine, commercial use needs the author's written permission.

    Gotchas

    The path resolution is the #1 stumble: a file sitting in C:\data\stats.csv won't be found if you type stats.csv and expect it relative to your working folder - relative is relative to ComfyUI's root. Encoding is #2: this node assumes UTF-8. A CSV saved from an old Excel in Windows-1252 or Latin-1 with accented characters will error out or garble - that's exactly why the pack ships Pandas Load CSV With Encoding. And if your CSV has an index column baked in, use Pandas Load CSV With Index instead, or the first data column gets eaten as names. It's a simple node - but a surprising amount of analysis goes wrong before it even starts, right here.

    CategoryData Analysis

    Inputs (1)

    NameTypeDefaultDescription
    file_pathSTRING

    Outputs (1)

    NameTypeDescription
    DATAFRAMEDATAFRAME