ComfyUI Node

Pandas Max

The per-column ceiling of your table

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

Before you build anything fancy, you usually want to know what you're dealing with: the high end of every column. Pandas Max computes the maximum value in each column of a DataFrame and returns it as a PDSERIES - one value per column, in one node. It's the "what's the ceiling here?" node, and it's part of the pack's summary-statistics family.

That family lives in ComfyUI-Data-Analysis, Hide Inada's (HowToSD's) pack that wraps pandas, Seaborn, and Matplotlib into ComfyUI nodes. The idea is that a data-exploration workflow should be buildable the same way you build an image workflow - as a graph you can read. Pandas Max, Mean, Median, Min, and friends are the "get a feel for the numbers" nodes you drop early in that graph.

How it works

The node runs dataframe.max() - that's the whole mechanism. pandas skips NaN values by default, so a column with some missing data still reports its real max. The result is a Series indexed by column name, so if your table has columns price, views, score, you get back a Series with one entry per column.

The output is a PDSERIES, not a DataFrame. That matters for wiring: you can pipe it into Pandas Series To DataFrame to make it tabular again, Pandas Series To String to read it, or use it directly in an arithmetic node like Pandas Add Series. There's no optional axis input here - it's always column-wise max, always skipping NaN. If you need a single number, that's a different shape of task; this gives you the whole vector.

The inputs that matter

One input, dataframe. Nothing else to configure - this is a deliberately dumb node, and the fewer knobs, the fewer ways to trip.

How to install it

Pack-wide install:

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

or ComfyUI Manager → search "Data analysis" → install. Restart, reload the browser tab. Dependencies are the pack's usual stack - pandas, matplotlib, seaborn, scipy, scikit-learn - and there's no GPU or model download involved.

Common issues

  • Max of a text column is a string - pandas will happily report the "max" (alphabetically last) of a string column. If that surprises you, your column isn't numeric; convert it first.
  • NaN output - an all-missing column can't produce a max and returns NaN for that column. It's not an error, just a flag that your data has a hole.
  • All-NaN if everything's strings - same root cause as above; the pack assumes you've done basic type cleanup upstream.

This is one of those nodes that's almost too simple to blog about - but when you're mid-workflow and need the ceiling of each column, it's one node instead of a trip out of ComfyUI.

CategoryData Analysis

Inputs (1)

NameTypeDefaultDescription
dataframeDATAFRAME

Outputs (1)

NameTypeDescription
PDSERIESPDSERIES