Nodes/ComfyUI-Data-Analysis/Pandas Eq Scalar Float
ComfyUI Node

Pandas Eq Scalar Float

Flag every cell that equals exactly this number

By HowToSD·Created 2 years ago·Updated about a year ago· 23
Pandas Eq Scalar Float
  • dataframe
  • DATAFRAME
number0

Pandas Eq Scalar Float is the simpler sibling of Pandas Eq: instead of comparing two DataFrames, it compares every cell in one DataFrame against a single float you type in. Output is the same boolean DataFrame - True where a cell equals your number, False where it doesn't. It's the node you reach for when "is this cell equal to X" is the whole question and you don't want to build a whole second DataFrame just to hold X.

Realistic uses: flagging rows where a field is exactly 0 (no sales, no response, zero count), or hunting for a sentinel value someone used instead of NaN - like a column of -1s standing in for "missing." Feed the boolean result into Pandas Boolean Index and you've turned "find the zeros" into a filter in two clicks.

How it works

One pandas call again: dataframe.eq(number). Element-wise, labels preserved, same alignment rules as the DataFrame-to-DataFrame version. And the same quirk applies: NaN never equals anything, so missing cells come back False no matter what number you compare against. If your goal is finding empty cells, this is the wrong node - that's Pandas Is NA's job.

The one trap worth actually caring about here is floating point. "Exactly equals" is a harsh test on computed floats. If your column holds the result of division (0.1 + 0.2), it rarely stores as the tidy decimal you think it is, and eq(0.3) will return False on values that look like 0.3 in a display. This node shines on integer-valued flags and clean sentinel checks, not on "did this calculation produce roughly this number" - for that you want a tolerance-based range check built from Pandas Ge Scalar Float and Pandas Le Scalar Float.

Inputs and outputs

  • dataframe (required, DATAFRAME) - the frame to scan.
  • number (required, FLOAT, default 0) - the value to test every cell against. The widget's range is enormous (basically int64 limits) and its step is fine-grained enough for most purposes, so you can type in decimals without fuss.
  • DATAFRAME output - the boolean mask, wired onward to Pandas Boolean Index or a show node.

Installing it

Installed as part of the pack: ComfyUI Manager → search "Data analysis" → install ComfyUI-Data-Analysis → restart → reload. Manual:

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

That's pandas, matplotlib, seaborn, scipy, scikit-learn, openpyxl and lxml. No GPU, no model files - this pack is all CPU tabular work, by Hide Inada (HowToSD), and it's free of the usual custom-node baggage beyond the dependency install.

CategoryData Analysis

Inputs (2)

NameTypeDefaultDescription
dataframeDATAFRAME
numberFLOAT0-9223372036854776000–9223372036854776000

Outputs (1)

NameTypeDescription
DATAFRAMEDATAFRAME