Pandas Pow Scalar Float
Pandas Pow Scalar Float
- dataframe
- DATAFRAME
This is the version of exponentiation you'll actually reach for. Pandas Pow Scalar Float raises every cell in a DataFrame to a single floating-point power you type in - square everything (2.0), take a square root (0.5), apply some gentle softening (0.25), all across the whole table in one node. The scalar version is the one that shows up in real pipelines; the full DataFrame-to-DataFrame and Series variants are mostly there for completeness.
It's part of the HowToSD/ComfyUI-Data-Analysis pack, the author's extension for doing structured data work inside ComfyUI. This node sits in its Arithmetic method family: every math operation from the pandas toolkit gets its own small node, and the scalar-powered variants like this one are the ones with day-to-day usefulness.
How it works
One pandas call under the hood: dataframe.pow(float_scalar). The float multiplies out to every cell - no alignment, no index matching, no surprises, because there's only one number involved. It's element-wise arithmetic, and for a scalar that's as simple as it gets. The input field clamps to a sensible range (-2^31 to 2^31) and defaults to 1.0, which is the identity operation - change it and watch the whole table transform.
Inputs and output
dataframe- the table to transform.float_scalar- the exponent, a FLOAT. Default1.0.
Output is a DATAFRAME of the same shape with every cell raised to that power. Wire it to a plot, a save node, or another transformation - nothing special about the downstream.
Installation
Standard for this pack. Fastest via ComfyUI Manager: search Data analysis, install ComfyUI-Data-Analysis, restart, reload. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/HowToSD/ComfyUI-Data-Analysis.git
mv ComfyUI-Data-Analysis data-analysis # example workflows need this name
pip install -r requirements.txt
Then restart ComfyUI. The requirements are the data-science stack - pandas, matplotlib, seaborn, scipy, scikit-learn - plus openpyxl and lxml. No GPU, no models, nothing to download beyond the pip packages.
Notes
If you only ever need integer powers, the pack also ships Pandas Pow Scalar Int - same idea, INT input instead of FLOAT. Honestly, for anything non-trivial, the float version is the one to use, because it covers integer cases too. The only thing to watch: raising negative values to fractional powers produces NaN (pandas follows real-number math, so (-4) ** 0.5 is not a real number). If your data has negatives and you're hitting NaN, that's almost certainly why.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| dataframe | DATAFRAME | — | |
| float_scalar | FLOAT | 1.00-2147483648–2147483648 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DATAFRAME | DATAFRAME | — |