ComfyUI Node

Pandas Std

Standard deviation per column, in one node

By HowToSD·Created 2 years ago·Updated about a year ago· 23
Pandas Std
  • dataframe
  • PDSERIES

If you're doing any real analysis in ComfyUI, you'll eventually want to know how spread out your numbers are. Pandas Std computes the standard deviation of every column in a DataFrame and hands it back as a Series. It's the df.std() you'd write in a notebook, wrapped in a node so it fits the graph.

It sits in the pack's summary-statistics family alongside Pandas Mean, Pandas Var, and Pandas Summary. Where Pandas Summary gives you the whole kitchen sink in one table, Pandas Std is the surgical version - one number per column, ready to be shown, compared, or fed into a downstream calculation. Reach for it when you want to compare spread across columns (is column A's range actually wilder than column B's?) or when you're about to normalize and want to confirm a column isn't already near-zero-variance, which would make a division by std explode.

How it works

Straight wrapper: dataframe.std(), which pandas computes column-wise by default. Note the statistical default: pandas uses ddof=1, the sample standard deviation, not the population one. For most analysis that's what you want - it matches what Pandas Summary reports in its std row, so the two will agree. NaN cells are skipped rather than treated as errors.

Inputs and outputs

  • dataframe (DATAFRAME) - the frame to measure. Non-numeric columns produce NaN.

Output: a single PDSERIES, one standard deviation per column, indexed by column name. Wire it into Pandas Show Series to read it, Pandas Series To Dataframe to turn it back into a table, or a plotting node to visualize spread.

Installing this pack

This node ships in ComfyUI-Data-Analysis by Hide Inada (HowToSD). CPU-only, no GPU, no model downloads - but the pack needs its Python stack, which stock ComfyUI lacks: pandas, matplotlib, seaborn, scipy, scikit-learn, openpyxl, lxml.

ComfyUI Manager: Manager → Custom Node Manager → search "Data analysis" → install ComfyUI-Data-Analysis → restart ComfyUI and refresh the browser. Manager installs the deps.

Git clone:

cd ComfyUI/custom_nodes
git clone https://github.com/HowToSD/ComfyUI-Data-Analysis.git
mv ComfyUI-Data-Analysis data-analysis   # example workflows depend on this folder name
pip install -r data-analysis/requirements.txt

Restart ComfyUI after installing.

Troubleshooting

  • A column returned NaN. It wasn't numeric. Convert with Pandas As Float or drop it before measuring.
  • "Wait, is this sample or population?" Sample (ddof=1), same as Pandas Summary's std row. If you genuinely need population std, this node won't do it - pandas' default is baked in with no toggle.
  • It's a Series, not a DataFrame. If your next node insists on a DATAFRAME, insert Pandas Series To Dataframe.
CategoryData Analysis

Inputs (1)

NameTypeDefaultDescription
dataframeDATAFRAME

Outputs (1)

NameTypeDescription
PDSERIESPDSERIES