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

Pandas At String

The node that turns one table cell into prompt text

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

If you've ever wanted a prompt that literally names a row from your dataset - "a photo of [this product from the table]" - Pandas At String is your node. It pulls a single cell out of a DataFrame by row and column labels and returns it as a STRING, ready to wire into a text or prompt node. It's the text-extraction member of the Pandas At family, and it's the one that lets your tabular data actually speak to the rest of the graph.

How it works

Same core as the family: dataframe.at[row_index, column_label], pandas' fast label-based single-cell accessor, returned as a string. You describe the target cell with four inputs - the row label, the column label, and a type switch for each (because your labels can be string or int, and the node has to know before it casts your typed text). What you get back is the cell's value as text.

Inputs and outputs

  • dataframe - the frame to read (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
  • Output: STRING

Why this one's worth having

Because ComfyUI is mostly text-and-numbers plumbing, a string output plugs into almost everything: prompt templates, filenames, Pandas Show Text, or a CDA String Create chain. Pull a category name, an ID, or a label out of a table and use it directly in a prompt - that's the pattern that makes people go "oh, that's what data analysis in ComfyUI is for." It's also the cleanest way to eyeball one specific value without dumping the whole frame.

Installing it

Ships with ComfyUI-Data-Analysis (Hide Inada / HowToSD.com). Manager: search Data Analysis → install → restart. Or:

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 needed; pandas comes via requirements.txt.

Gotchas

The string/int label switch is the recurring trap in this family - wrong enum, instant KeyError. Also remember it reads by label, so for positional access you want Pandas Iat String. And beware of a cell holding a non-string value: the node stringifies it, so a float like 10.5 comes out as "10.5" - fine for text, but don't try to feed it back into numeric nodes without converting.

CategoryData Analysis

Inputs (5)

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

Outputs (1)

NameTypeDescription
STRINGSTRING