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

Pandas Mul Scalar Int

Multiply a whole DataFrame by one integer

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

Doubling a table, tripling counts, converting units that happen to be whole numbers - Pandas Mul Scalar Int multiplies every cell in a DataFrame by one integer. It's the "everything times N" node for when N is a clean integer, and it's the sibling of Pandas Mul Scalar Float in the pack's arithmetic family.

The pack is ComfyUI-Data-Analysis by Hide Inada (HowToSD), which wraps pandas, Seaborn, and Matplotlib into ComfyUI nodes so structured data analysis runs in the same canvas as image generation. This node does dataframe * int_scalar - one operator, nothing clever, nothing to trip over.

How it works

The node runs dataframe * int_scalar, scaling every numeric cell by your integer. Whole-table, no alignment concerns - a scalar applies uniformly, which is the whole point of reaching for it over the frame-vs-frame variant. Integer multiplication keeps your values integer, which is handy when you're counting things and don't want floats sneaking in.

Output is a DATAFRAME with the same shape and labels. From there it just continues down your pipeline.

The inputs that matter

  • dataframe - the frame to scale.
  • int_scalar - an INT, default 1, full signed 32-bit range. The multiplier. Default is a no-op until you change it.

Honest note: pandas upcasts freely, so Pandas Mul Scalar Float with 3.0 and this node with 3 produce the same numbers against numeric data. The reason to pick int is intent and readability, not behavior.

How to install it

Same one-pack 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. The pack's usual dependencies (pandas, matplotlib, seaborn, scipy, scikit-learn) arrive with it; no GPU, no model files.

Common issues

  • TypeError on text columns - you can't multiply strings by ints. Convert columns to numeric first.
  • Nothing happened - int_scalar is still 1. Change it.
  • Overflow - the scalar range is signed 32-bit, and your data could overflow if you multiply huge ints together; pandas will typically float it or complain rather than silently corrupt.

It's a two-input node that does one thing. When "double everything" is the operation, this is the one you want.

CategoryData Analysis

Inputs (2)

NameTypeDefaultDescription
dataframeDATAFRAME
int_scalarINT1-2147483648–2147483648

Outputs (1)

NameTypeDescription
DATAFRAMEDATAFRAME