Nodes/ComfyUI-Data-Analysis/Pandas Gt Scalar Int
ComfyUI Node

Pandas Gt Scalar Int

Strict integer thresholds for counts and ranks

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

Pandas Gt Scalar Int marks every cell True when it's strictly greater than the integer you set. "Greater than," not "greater than or equal" - that distinction is the whole reason this node exists alongside Pandas Ge Scalar Int. If your threshold is 5, Gt keeps 6, 7, 8…; Ge would also keep the 5s. Choose the one that matches your question.

For integer data - counts, ranks, years, ratings - this is the natural "above this value" filter. "Keep rows where the visit count is greater than 10." "Players with more than 100 games." When your data is whole numbers, comparing as ints is cleaner than dragging floats into it, and the boolean mask that comes out feeds the same downstream machinery as every comparison node: Pandas Boolean Index to filter rows, a show node to inspect.

How it works

dataframe.gt(number) with an int, element-wise across the frame. Because it's strict, a cell exactly equal to the threshold is False - and that's a classic off-by-one mistake, so it's worth double-checking which variant you dropped on the canvas when your filter looks one row short. Float-typed columns holding whole numbers still compare correctly (4.0 > 4 is False, 5.0 > 4 is True). NaN comes back False, as in the rest of the family, and text columns compare False against an int.

The number input spans the full 32-bit signed range, so you're not hitting limits with real data. And like its siblings, this is a whole-frame comparison - if you only want to filter on one column, slice it first with Pandas Select Columns, otherwise the mask reflects every column in the frame.

Inputs and outputs

  • dataframe (required, DATAFRAME) - the frame to test.
  • number (required, INT, default 0) - the exclusive integer threshold.
  • DATAFRAME output - boolean mask, True only where a cell strictly exceeds the threshold.

Installing it

Standard pack install. 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

Requirements: pandas, matplotlib, seaborn, scipy, scikit-learn, openpyxl, lxml. No GPU, no model downloads. Hide Inada's pack has shipped these thin pandas wrappers since 2024 and the comparison nodes are some of the least-likely-to-break things in it - the real install risk is skipping requirements.txt and then wondering why every node is red.

CategoryData Analysis

Inputs (2)

NameTypeDefaultDescription
dataframeDATAFRAME
numberINT0-2147483648–2147483648

Outputs (1)

NameTypeDescription
DATAFRAMEDATAFRAME