Pandas At Set Datetime
Write a datetime into a specific cell — and know it mutates
- dataframe
- data
- DATAFRAME
The Pandas At family reads cells. Pandas At Set Datetime writes one. It takes a DataFrame, finds a single cell by row and column labels, and replaces it with a Python datetime - then hands the (modified) frame back out. It's the "write this timestamp into the table" node, the inverse of Pandas At Datetime.
How it works
The mechanism is dataframe.at[row_index, column_label] = data, pandas' label-based single-cell assignment. You point at the cell with four inputs - row label, column label, and a string/int type switch for each - and the data input supplies the datetime. The node then returns the DataFrame with the cell updated.
Here's the part the docs call out explicitly: this modifies the input DataFrame in place. pandas .at assignment mutates the object rather than making a copy. In ComfyUI terms, that means any other node reading the same DataFrame output upstream can see the mutation too, depending on execution order. The returned frame is the same object, just edited. It usually works out fine in a simple graph, but it's the kind of thing that bites you in a big workflow, so it's worth knowing.
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 datetime to write (PYDATETIME)- Output:
DATAFRAME
When you'd reach for it
Anytime a table needs a timestamp patched in from elsewhere in the graph - record "processed at this time" into a results frame, overwrite a stale date, or set a cell from a datetime that came out of Py String To Datetime or another Pandas At Datetime. You read, you transform, you write back: that read-modify-write loop is exactly what this node completes.
Installing it
Part of ComfyUI-Data-Analysis (author 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 needed; pandas comes from requirements.txt.
Gotchas
The in-place mutation is the big one - if two downstream branches depend on the same frame, be deliberate about where you place the setter. Label mismatch (string vs int) is the other classic; wrong enum and you'll get a KeyError. And the data input expects a real PYDATETIME, so wire in a datetime-producing node - a bare string won't fly.
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 | PYDATETIME | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DATAFRAME | DATAFRAME | — |