Pandas Eq Scalar Int
The node for matching integer codes
- dataframe
- DATAFRAME
Pandas Eq Scalar Int tests every cell in a DataFrame for equality against one integer. True where the cell matches your number, False everywhere else - the integer-flavored cousin of Pandas Eq Scalar Float. It exists because a huge amount of real tabular data is integer codes: a category column where 1 means "cat", 2 means "dog", 3 means "other"; a tier column of 0/1/2; a status flag where 0 is "ok". This node is how you turn "rows where category equals 1" into a boolean mask you can filter on.
The workflow that makes it click: Pandas Load CSV → Pandas Eq Scalar Int (number = the code you care about) → Pandas Boolean Index. That last node takes the boolean result and keeps only the matching rows. In the pack's own baseball tutorial the equivalent logic - filtering by a column value to isolate a subset - is the step that turns a giant stats table into "just the rows I care about," so you're using the same machinery the flagship example is built around.
How it works
dataframe.eq(number) with an int. Same alignment and label rules as every comparison node in the pack. Since the comparison target is an integer, the float-precision footgun of the float version mostly doesn't apply - eq(1) reliably matches cells that hold the integer 1. One subtlety: if your column is float-typed but holds whole numbers, 1.0 == 1 still matches in pandas, so you're usually safe. But NaN still never equals anything, so blank cells come back False - if you're hunting for missing values, reach for Pandas Is NA instead.
Inputs and outputs
- dataframe (required,
DATAFRAME) - the frame to scan. - number (required,
INT, default 0) - the code you're matching. Range is the full 32-bit signed span, which is plenty for categorical codes. - DATAFRAME output - the boolean mask. Straight into Pandas Boolean Index, or into a show node if you just want to eyeball where the matches are.
Installing it
One pack, one install. ComfyUI Manager: search "Data analysis", install ComfyUI-Data-Analysis, restart, reload the browser. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/HowToSD/ComfyUI-Data-Analysis
mv ComfyUI-Data-Analysis data-analysis
pip install -r data-analysis/requirements.txt
Requirements are pandas, matplotlib, seaborn, scipy, scikit-learn, openpyxl, lxml. No GPU and no model downloads - this is a pure CPU data-analysis extension, and once the pip install succeeds it just works. The author's on record recommending the pack on r/comfyui specifically for building Pandas workflows visually, which is exactly the corner this node lives in.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| dataframe | DATAFRAME | — | |
| number | INT | 0-2147483648–2147483648 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DATAFRAME | DATAFRAME | — |