Pandas At Set String
Drop a string into a single cell, in place
- dataframe
- DATAFRAME
The string setter of the family: Pandas At Set String overwrites a single cell in a DataFrame with text and returns the edited frame. Where Pandas At String reads a label out of the table to feed your prompt, this writes a label back in - patching a category, a name, or a status field without rebuilding anything.
How it works
dataframe.at[row_index, column_label] = data, pandas' label-based single-cell assignment. You locate the cell with four inputs - row label, column label, and a string/int type enum for each - and pass the new text via the STRING data input. The node returns the DataFrame with that cell overwritten.
As with every setter in this pack, the docs are explicit: this modifies the input DataFrame in place. pandas .at assignment edits the existing object rather than returning a copy, so nodes sharing the same upstream DataFrame can observe the write depending on execution order. In a small graph, nothing to worry about; in a big one, put setters at the end of the branch.
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 text to write (STRING)- Output:
DATAFRAME
When you'd reach for it
Fixing a misspelled category in a loaded table; recording a status string into a results frame; or completing a read-modify-write loop where you read a name, transform it in a text node, and write it back. It's also handy when a workflow needs to annotate data before saving - stringify the annotation and drop it into a cell.
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 rules: wrong label-type enum → KeyError; label-based, not positional (positional wants Pandas Iat Set String). And the in-place mutation - if other branches read the same frame, they'll see your write. Writing a string into a numeric column also upcasts that column to object dtype, so do it before any math that expects numbers.
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 | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DATAFRAME | DATAFRAME | — |