ComfyUI Node

Pandas Create

The fastest on-ramp to pandas in ComfyUI

By HowToSD·Created 2 years ago·Updated about a year ago· 23
Pandas Create
    • DATAFRAME
    data

    Most ComfyUI custom nodes eat images and spit out images. This pack is the odd one out: it's a full pandas wrapper by Hide Inada (HowToSD), built for people who want to run structured, tabular data analysis through ComfyUI's node graph. And Pandas Create is where nearly every workflow in it starts - it's the node that turns text you type into a proper DataFrame you can feed the rest of the pack.

    The pitch is simple. You get a big multiline text field, you paste or type CSV, you get a DATAFRAME on the output. No file paths, no loader node, no need for the data to live anywhere. It's the quickest way to bootstrap a small table and start wiring it into analysis nodes - think of it as "create a DataFrame inline" rather than "load a DataFrame from disk."

    How it works

    Under the hood it's a one-liner:

    df = pd.read_csv(StringIO(data))
    

    Your text is treated as a CSV string and parsed by pandas, with the first row becoming the column headers and every line after it a row. Because it's real CSV parsing you get type inference for free - a column of numbers comes out as numeric, a column of text stays as object dtype. No quoting escapes to remember beyond normal CSV rules.

    There's exactly one input to set: data, a multiline string. One output, DATAFRAME, which is the pack's custom wire type for pandas DataFrames - it carries the actual pd.DataFrame object, not a serialized string, so you can chain it straight into Pandas Show DataFrame, a plotting node like SNS Line, or any of the arithmetic nodes.

    The two things that trip people up

    First, the text field widget is a bit fiddly in the graph. The user's guide is explicit: to connect a wire into a node like this, aim for the top-left corner of the field - hover around the edge and the connection point shows up. People spend real minutes dragging a wire that won't stick.

    Second, remember this node creates a fresh table every time. It's for hand-entered data or small snippets you want to eyeball, not for your 50 MB CSV. That's what Pandas Load CSV is for. If your table's first column is already an index you want preserved, reach for its sibling Pandas Create With Index instead - that one lets you set which column is the index.

    Installing the pack

    The pack isn't in base ComfyUI, so you need it installed first. ComfyUI Manager is the easy route - search "Data analysis" and install. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/HowToSD/ComfyUI-Data-Analysis.git
    mv ComfyUI-Data-Analysis data-analysis   # case matters; examples expect this folder name
    pip install -r requirements.txt
    

    Note the mv: the README is blunt that skipping the rename breaks the example workflows. Also, this pack needs pandas and matplotlib, which base ComfyUI doesn't ship - Manager usually installs them, but if it fails, pip install pandas matplotlib seaborn covers you. No GPU needed for any of it, which is rare for a ComfyUI node and genuinely nice.

    CategoryData Analysis

    Inputs (1)

    NameTypeDefaultDescription
    dataSTRING

    Outputs (1)

    NameTypeDescription
    DATAFRAMEDATAFRAME