Pandas Kurtosis
How peaky is your data? Ask kurtosis.
- dataframe
- PDSERIES
Kurtosis is the shape statistic that tells you whether your distribution has heavy tails or is flat and uniform relative to a normal bell curve. PandasKurtosis computes it for every column (or row) of a DataFrame and returns the result as a Series - a one-node way to ask "is this data unusually peaky or unusually flat?" before you trust your summary stats or assumptions.
It's part of HowToSD's ComfyUI-Data-Analysis pack, Hide Inada's pandas/matplotlib/seaborn wrapper set for ComfyUI. No GPU, no models - it's a summary-statistics node, squarely in the "explore your table" family.
How it works
The call is dataframe.kurtosis(axis=...), and the node's own docstring is explicit about a detail that surprises people: it returns excess kurtosis, not raw kurtosis. That means 3 is subtracted from the raw value, so a perfectly normal distribution scores 0. The interpretation becomes intuitive:
- ~0 → about as peaky as a normal distribution.
- Positive → heavy tails / more extreme outliers than normal.
- Negative → flatter, more uniform, lighter tails.
The axis dropdown controls the direction. index computes per column (one kurtosis value per column), which is the usual choice. columns flips it to per row, which is only meaningful if your rows are comparable series.
The output is a PDSERIES - the pack's custom Series type - holding one kurtosis value per column (or row).
The inputs that matter
- dataframe - the table to summarize.
- axis -
index(per-column, the normal case) orcolumns(per-row).
Output: a single PDSERIES of kurtosis values.
Installing it
Same install as the whole pack. ComfyUI Manager: search "ComfyUI-Data-Analysis", install, restart - pandas, matplotlib, seaborn, scipy, scikit-learn, openpyxl, and lxml are installed for you. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/HowToSD/ComfyUI-Data-Analysis.git
pip install -r requirements.txt
Then rename the clone to data-analysis so the bundled examples work. License: custom non-commercial - personal and academic use is allowed, commercial use needs the author's written permission.
Gotchas
Kurtosis on small samples is noisy and on columns with a constant value it throws or returns NaN - don't feed it a column full of zeros and expect a meaningful number. It's also sensitive to outliers by design (that's the point), so a single extreme value can dominate the result; check your data for spikes before reading too much into it. And remember the excess-kurtosis convention: 0 = normal, not 3. If you've ever seen "kurtosis of 3" in an old textbook and wondered why this node disagrees, that's the reason. If all you need is a quick feel for spread, Pandas Kurtosis is overkill next to standard deviation - but when tail shape actually matters, this is the honest statistic for it.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| dataframe | DATAFRAME | — | |
| axis | COMBO | 2 options: index, columns |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| PDSERIES | PDSERIES | — |