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

Pandas Ne Scalar Float

Flag every cell that isn't this number

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

"Which cells aren't this value?" is a surprisingly common question - find the anomalies, spot the mis-keyed entries, locate everything that deviates from an expected constant. Pandas Ne Scalar Float answers it for a whole DataFrame against one number, returning a boolean table where every cell that isn't your target is True. It's the scalar sibling of Pandas Ne, and the complement of Pandas Eq Scalar Float.

It's part of ComfyUI-Data-Analysis by Hide Inada (HowToSD), the pack that wraps pandas, Seaborn, and Matplotlib into ComfyUI nodes for data analysis in the same canvas as image generation. The mechanism is one line: dataframe.ne(number).

How it works

The node calls dataframe.ne(number). Every cell not equal to your float → True; cells equal to it → False; NaN cells → True, because in pandas a missing value isn't equal to anything, your number included. So on a partially-empty column, the missing spots show up as "not equal" too - usually fine for anomaly-spotting, occasionally surprising if you thought you were only flagging real values.

Output is a DATAFRAME of booleans, same shape and labels. Like every comparison node in this pack, it's the raw material for filtering - Pandas Boolean Index turns that mask into actual rows.

The inputs that matter

  • dataframe - the frame to scan.
  • number - a FLOAT, default 0, spanning the full signed 64-bit range. The value you're testing against.

That's it - two inputs, one boolean-mask output.

How to install it

Same 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. Standard dependencies (pandas, matplotlib, seaborn, scipy, scikit-learn); no GPU, no models.

Common issues

  • NaN cells flagged as True - pandas treats missing as not-equal-to-everything. Fill or drop NaN first if you want only "real value differs" flags.
  • Everything flags - your data is strings, so no cell equals a float. Convert columns to numeric.
  • Float equality is exact - 0.30000000000000004 != 0.3 is a real float problem, not a node bug. If you're hunting for a computed value, round your data first.

There's no glamour here, and there shouldn't be. You want a "differs from this constant" mask, you get one node that does exactly that.

CategoryData Analysis

Inputs (2)

NameTypeDefaultDescription
dataframeDATAFRAME
numberFLOAT0-9223372036854776000–9223372036854776000

Outputs (1)

NameTypeDescription
DATAFRAMEDATAFRAME