Pandas Mul Scalar Float
Scale an entire DataFrame by one number
- dataframe
- DATAFRAME
Scaling. Every workflow needs it at some point - multiply all the prices by a tax rate, convert units, normalize a range by a factor. Pandas Mul Scalar Float takes a DataFrame and multiplies every cell by a single floating-point number. One input, one number, whole table transformed. It's the "everything times this" node.
It's part of ComfyUI-Data-Analysis by Hide Inada (HowToSD), the pack that brings pandas, Seaborn, and Matplotlib into ComfyUI so data analysis can live in the same graph as image generation. This node is the scalar member of the multiply family - dataframe * float_scalar, exactly what you'd write in a notebook.
How it works
The node runs dataframe * float_scalar - Python's plain multiplication operator applied to the whole frame. Every numeric cell is scaled by your number. There's no label alignment to worry about (that's the frame-vs-frame nodes' problem), because a scalar applies everywhere identically. Non-numeric columns either raise or produce a type error, so keep your data numeric.
The output is a DATAFRAME with the same shape and labels - every value multiplied. It flows into the next node in your pipeline exactly like the input did.
The inputs that matter
dataframe- the frame to scale.float_scalar- aFLOAT, default1. The multiplier. Note the default is1(a no-op), so the node does nothing until you actually change it - a sensible safety default.
Output: DATAFRAME. If your multiplier is a whole number, Pandas Mul Scalar Int works identically; use whichever matches the number you're typing.
How to install it
Same 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 standard stack (pandas, matplotlib, seaborn, scipy, scikit-learn) comes with it; no GPU or model downloads.
Common issues
- TypeError on a text column - pandas can't multiply strings by floats. Clean or drop non-numeric columns first.
- Nothing changed -
float_scalaris still at its default1. Set it to the number you actually want. - Rounding drift - float multiplication can introduce tiny artifacts (0.1 * 3 = 0.30000000000000004). If you're doing money math, that's a floating-point truth, not a node bug; round at the end.
Boring and dependable - that's the whole value. Scale your whole table by one number, in one node, without touching a script.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| dataframe | DATAFRAME | — | |
| float_scalar | FLOAT | 1.00-2147483648–2147483648 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DATAFRAME | DATAFRAME | — |