Pandas Iat Set Int
Correct a single integer cell, position by position
- dataframe
- DATAFRAME
PandasIatSetInt is the integer-flavored version of the pack's cell-editing nodes: it writes one integer into one cell of a DataFrame, at a row and column you specify by position. If you've loaded a CSV and one count or one ID is wrong, this is the cleanest way to patch it without rebuilding the whole table.
It ships in HowToSD's ComfyUI-Data-Analysis pack, Hide Inada's project for running pandas workflows inside ComfyUI's node graph. The whole pack is wrappers around pandas/matplotlib/seaborn - no GPU, no models, just Python data tools wearing ComfyUI sockets.
How it works
Under the hood it's exactly one pandas call: dataframe.iat[row_integer_position, column_integer_position] = data. .iat targets a cell by integer position - the physical row/column number, 0-based - which is different from pandas' .at, which looks up by row label and column name. Position means "fourth row, second column," not "the row whose index says 'bob'." That's the mental model to hold onto, because it applies to the whole iloc/iat family in this pack.
The data input is a plain INT widget, min/max roughly the 32-bit range. Type your correction, wire a DataFrame in, and the node writes the value in place and returns the same DataFrame.
The inputs that matter
- dataframe - the DataFrame to edit.
- row_integer_position and column_integer_position - both default to 0. Both are position-based and 0-counted, so be deliberate: leaving them untouched rewrites cell [0, 0].
- data - the integer value, typed in the widget.
Output is the edited DATAFRAME, which you'd normally feed into a Pandas Show / Save node to verify.
Installing it
Same as every node in this pack. Via ComfyUI Manager: search "ComfyUI-Data-Analysis", install, restart - dependencies (pandas, matplotlib, seaborn, scipy, scikit-learn, openpyxl, lxml) are handled for you. Manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/HowToSD/ComfyUI-Data-Analysis.git
pip install -r requirements.txt
Then rename the clone to data-analysis or the shipped example workflows will fail. And the licensing detail that bites people: this pack is not open-source permissive - it's a custom non-commercial license. Personal and academic use is allowed; commercial use requires written permission from the author.
Gotchas
Two things. First, in-place mutation: the node edits the DataFrame you hand it and passes the same object forward, so a DataFrame that fans out to multiple branches will show the edit everywhere. Second, dtype: if the target column holds floats and you write an int into it, pandas usually upcasts or stores it fine - but if the column is object dtype, an int becomes 42 as text-ish object, which quietly breaks later math. When in doubt, check the column dtype before you pick the int node over the float one. And remember positions are 0-based - row 1 is the second row - and out-of-range positions raise an IndexError that fails the run.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| dataframe | DATAFRAME | — | |
| row_integer_position | INT | 00–2147483648 | — |
| column_integer_position | INT | 00–2147483648 | — |
| data | INT | 0-2147483648–2147483648 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DATAFRAME | DATAFRAME | — |