Pandas At Set Float
Patch one cell with a number, in place
- dataframe
- DATAFRAME
Sometimes you don't need a whole new table. You need to fix one number in the one you've got. Pandas At Set Float finds a single cell by row and column labels and overwrites it with a float - then hands the edited DataFrame back. It's the write-side counterpart to Pandas At Float, and it's the smallest possible "edit one value" tool in the pack.
How it works
The mechanism is dataframe.at[row_index, column_label] = data. You describe the target with the usual four inputs - row label, column label, and a string/int type switch for each - and supply the new value via the data FLOAT input. The node returns the frame with the cell replaced.
And the footnote that matters: this modifies the input DataFrame in place. pandas .at assignment edits the existing object rather than copying it, and the author says so explicitly in the docs. In a graph, any node reading from the same DataFrame output can see the change depending on execution order. For a simple workflow it's a non-issue; for a sprawling one, be deliberate about where the setter sits.
Inputs and outputs
dataframe- the frame to edit (DATAFRAME)row_index- the row's label (STRING)row_index_type-stringorintcolumn_label- the column's label (STRING)column_label_type-stringorintdata- the float to write, default 0 (FLOAT)- Output:
DATAFRAME
When you'd reach for it
Correcting a bad value in a loaded table without rebuilding it; writing a computed result back into a results frame; or rounding out the read-modify-write loop - read with Pandas At Float, transform in a math node, write back here. It's niche, but when you need it, you need it, because the alternative is reconstructing the whole DataFrame.
Installing it
Part of ComfyUI-Data-Analysis (Hide Inada / HowToSD.com). Manager: search Data Analysis → install → restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/HowToSD/ComfyUI-Data-Analysis.git
mv ComfyUI-Data-Analysis data-analysis
pip install -r data-analysis/requirements.txt
No GPU; pandas comes via requirements.txt.
Gotchas
Same family theme: wrong label type enum → KeyError; label-based (not positional), so "third row, second column" wants Pandas Iat Set Float instead. And keep the in-place mutation in mind - if the same frame feeds other branches, place this node at the end of the line or accept that everything downstream sees the patched value.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| dataframe | DATAFRAME | — | |
| row_index | STRING | — | |
| row_index_type | COMBO | 2 options: string, int | |
| column_label | STRING | — | |
| column_label_type | COMBO | 2 options: string, int | |
| data | FLOAT | 0-9223372036854776000–9223372036854776000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DATAFRAME | DATAFRAME | — |