Nodes/ComfyUI-Data-Analysis/Pandas At Set String
ComfyUI Node

Pandas At Set String

Drop a string into a single cell, in place

By HowToSD·Created 2 years ago·Updated about a year ago· 23
Pandas At Set String
  • dataframe
  • DATAFRAME
row_index
row_index_type
column_label
column_label_type
data

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 - string or int
  • column_label - the column's label (STRING)
  • column_label_type - string or int
  • data - 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.

CategoryData Analysis

Inputs (6)

NameTypeDefaultDescription
dataframeDATAFRAME
row_indexSTRING
row_index_typeCOMBO2 options: string, int
column_labelSTRING
column_label_typeCOMBO2 options: string, int
dataSTRING

Outputs (1)

NameTypeDescription
DATAFRAMEDATAFRAME