ComfyUI Node

Pandas Is NA

Map every missing value in your data before it bites you

By HowToSD·Created 2 years ago·Updated about a year ago· 23
Pandas Is NA
  • dataframe
  • DATAFRAME

Pandas Is NA answers the question nobody asks until it's too late: where exactly are the missing values in this DataFrame? It takes a frame and returns a same-shaped frame of booleans - True where a cell is NA, False where it isn't. It's a diagnostic, not a fix, and it's the node you run before you decide whether to fill holes or drop rows.

It's part of ComfyUI-Data-Analysis, HowToSD's pack that brings Pandas into the node graph. Loaded data is a black box; this node is how you audit it. The output is itself a DataFrame, which is both the point and the gotcha.

How it works

The implementation is dataframe.isna() - literally the pandas method, no embellishment. Every cell becomes True or False. Where people get confused: this is not a count, not a summary, not a filter. It's a mask, same size as the input, and it's a boolean DataFrame. A 10×3 frame in gives a 10×3 frame of booleans out.

That mask is genuinely useful if you know what to do with it. It can feed the pack's Pandas Boolean Index node to select the rows that have holes - that's the real power move: find your dirty rows, look at them, then decide. On its own, though, a wall of True/False is hard to read, so pair it with Pandas Show Data Frame to render it visually.

Inputs and outputs

  • dataframe (required, DATAFRAME) - the frame to audit.
  • DATAFRAME output - boolean mask, True wherever the input had a missing value.

How it fits a workflow

The natural pattern is a decision fork. Load a CSV, run Pandas Is NA, and route the mask into Pandas Boolean Index to inspect the offending rows. From there you choose your remedy:

  • Pandas Fill NA Scalar Float / Int - replace the gaps with a value (keeps row count).
  • Pandas Drop NA - delete the offending rows outright.

Is NA is the "look before you leap" step that turns those fixes from guesswork into informed choices. If you're plotting and your chart has an unexplained gap, run this to confirm the cause before blaming Matplotlib.

Installing it

Same install as the whole 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   # README: examples expect this folder name
pip install -r data-analysis/requirements.txt

That pulls pandas, matplotlib, seaborn, scipy, scikit-learn, openpyxl, and lxml - the pack's actual dependency surface, none of which ship with ComfyUI. No GPU needed. The PyTorch-tensor nodes moved to ComfyUI-Pt-Wrapper in March 2025, leaving this pack CPU-only.

Gotchas

  • It's a mask, not a summary. You get booleans, not "17 missing values." For a quick count, run Pandas Sum on the result - summing the True cells gives you the total per column.
  • Unreadable raw. Pipe it through a show node; a raw boolean grid on a 200-row frame is noise.
  • Blank strings aren't NA by default. Pandas treats "" as a value, not missing. If your file uses empty strings, fillna/isna won't see them as holes - clean those first.
CategoryData Analysis

Inputs (1)

NameTypeDefaultDescription
dataframeDATAFRAME

Outputs (1)

NameTypeDescription
DATAFRAMEDATAFRAME