Nodes/ComfyUI-Data-Analysis/Pandas Iat Set Float
ComfyUI Node

Pandas Iat Set Float

Write a float into one cell without touching the rest

By HowToSD·Created 2 years ago·Updated about a year ago· 23
Pandas Iat Set Float
  • dataframe
  • DATAFRAME
row_integer_position0
column_integer_position0
data0

Sometimes a DataFrame is right except for one number. A price that should be 4.11, a weight that came out of a parse as a string. PandasIatSetFloat is the cell-level correction node: give it a DataFrame, a row position, a column position, and a float, and it writes that value into exactly one cell. The other ~1000 rows stay alone.

It belongs to the HowToSD ComfyUI-Data-Analysis pack - Hide Inada's collection of pandas, matplotlib, and seaborn wrappers that turns ComfyUI into a visual data-analysis tool. Like every node in the pack it's just pandas behind a ComfyUI face, so no GPU and no models to download.

How it works

The whole node is dataframe.iat[row_integer_position, column_integer_position] = data - pandas' position-based accessor. .iat indexes by integer position rather than label, so row 0 is always the first row even if your index is names or dates. The value is written in place and the same DataFrame object comes back out the DATAFRAME output.

The data input is a plain FLOAT widget, so you can type the correction directly - that's what makes this one more convenient than its datetime sibling, which needs a whole conversion node. You set the number in the box and it lands in the cell.

The inputs that matter

  • dataframe - the DataFrame you're editing.
  • row_integer_position / column_integer_position - both default to 0. Watch this: the defaults quietly edit cell [0, 0]. If your target is row 12, column 3, set both, because neither widget will remind you.
  • data - the float to write.

One DATAFRAME comes out; wire it to a show or save node to check your work.

Installing it

Standard for the pack. ComfyUI Manager, search "ComfyUI-Data-Analysis", install, restart - Manager handles the dependencies (pandas, matplotlib, seaborn, scipy, scikit-learn, openpyxl, lxml). Or clone manually:

cd ComfyUI/custom_nodes
git clone https://github.com/HowToSD/ComfyUI-Data-Analysis.git
pip install -r requirements.txt

Then rename the folder to data-analysis if you want the bundled example workflows to run (the README is explicit about this one). Worth flagging once: the license is custom and non-commercial - fine for personal and academic use, but commercial work needs written permission from the author.

Gotchas

In-place mutation is the thing to remember. This node edits the DataFrame it receives and passes the same object on, so if one dataframe feeds several branches, every branch sees the write. Also, the row and column are 0-based and out-of-range positions raise an IndexError that kills the run - you get an error, not a silent skip. And if the column you're writing into is an int dtype, pandas will happily store the float or complain depending on the column - so if your "float" is really an integer count, use PandasIatSetInt instead and save yourself the type coercion surprises.

CategoryData Analysis

Inputs (4)

NameTypeDefaultDescription
dataframeDATAFRAME
row_integer_positionINT00–2147483648
column_integer_positionINT00–2147483648
dataFLOAT0-9223372036854776000–9223372036854776000

Outputs (1)

NameTypeDescription
DATAFRAMEDATAFRAME