ComfyUI Node

Pandas Gt

The strict 'greater than' comparison, cell by cell

By HowToSD·Created 2 years ago·Updated about a year ago· 23
Pandas Gt
  • a_dataframe
  • b_dataframe
  • DATAFRAME

Pandas Gt is the > of the comparison family - strict greater-than, element by element, between two DataFrames. Feed it frame A and frame B and you get a boolean DataFrame where each cell is True only when A's value is strictly bigger than B's. It sits right next to Pandas Ge (>=) in the pack, and the only difference between them is whether an exact tie counts as a match. Gt says no.

Like the other DataFrame-to-DataFrame comparators (Pandas Eq, Pandas Ge), this is a narrow tool. The majority of "greater than" questions people actually have are against a fixed threshold - that's Pandas Gt Scalar Float or Pandas Gt Scalar Int. Gt itself earns its keep when you're diffing two real tables: compare last week's export against this week's and flag every cell where the number went strictly up. Paired with Pandas Sub for the delta and a boolean-index node to filter, it composes into a "what improved" report in a handful of nodes.

How it works

a_dataframe.gt(b_dataframe), element-wise, output shaped and labeled like the left frame. Pandas alignment rules apply, so mismatched indexes produce NaN at the non-aligning positions - and since NaN is neither greater nor not-greater in a meaningful way, treat NaN cells as "unknown" rather than reading them as False. Strict comparison means 5 > 5 is False; if you want ties to pass, swap in Pandas Ge - it's a two-second substitution that changes the whole meaning of the result.

Inputs and outputs

  • a_dataframe (required, DATAFRAME) - the left frame.
  • b_dataframe (required, DATAFRAME) - the right frame.
  • DATAFRAME output - boolean result, left-aligned.

Installing it

Installed with the pack, once. 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

pandas, matplotlib, seaborn, scipy, scikit-learn, openpyxl, lxml. No GPU, no model downloads. Since these comparison nodes are thin wrappers over pandas methods, once the pack loads, they basically never misbehave - the failure surface is the install, not the node.

CategoryData Analysis

Inputs (2)

NameTypeDefaultDescription
a_dataframeDATAFRAME
b_dataframeDATAFRAME

Outputs (1)

NameTypeDescription
DATAFRAMEDATAFRAME