Nodes/ComfyUI-huggingface_dataset/πŸ€— Dataset Rename Column
ComfyUI Node

πŸ€— Dataset Rename Column

Fix a column name in one box β€” no schema, no migration, no drama

By StableLlamaΒ·Created a day agoΒ·Updated a day agoΒ· 1
πŸ€— Dataset Rename Column
  • dataset
  • dataset
β—„original_columnβ–Ί
β—„new_columnβ–Ί

The dataset's column is called review_text and every node you've built downstream expects text. Or the source ships prompt and your export wants caption. πŸ€— Dataset Rename Column exists so that mismatch is a two-second fix in the graph instead of a reload or a text-editor pass over a file. It renames a single column and hands the dataset back, everything else untouched.

How it works

It's datasets.Dataset.rename_column as a node. Three inputs, and they tell the whole story:

  • dataset - what to operate on.
  • original_column - the name it has now. Type it wrong and you'll get an error naming the missing column, which doubles as a spelling check on the schema.
  • new_column - the name you want.

One output: the dataset with the renamed column, same rows, same values, same order. Chain it into Filter, To Data List, or anything else - downstream nodes see the new name only.

Two things make this node better than it sounds. It works on streaming datasets too, so you can fix a name on a lazy IterableDataset without forcing a full load. And it's genuinely the cheapest repair in the pack - a data-cleaning fix with zero structural risk, which is more than most schema changes can claim.

The gotchas are both about scope

First, it's strictly one column per node. Two renames means two nodes in a row - there's no comma-separated multi-rename here. Second, renaming to a name that already exists is an error rather than a merge, so you can't accidentally overwrite a column this way; if that's genuinely what you want, Remove Columns first, then rename. And if you find yourself renaming the same column in every workflow you load from the Hub, the honest fix is upstream - save the workflow with the rename node built in and it'll be applied every time.

Installing it

Part of StableLlama/ComfyUI-huggingface_dataset. ComfyUI-Manager β†’ search "Hugging Face dataset", or:

cd ComfyUI/custom_nodes
git clone https://github.com/StableLlama/ComfyUI-huggingface_dataset
pip install -r requirements.txt

Restart ComfyUI. Only runtime dependency is datasets, handled by Manager.

CategoryHugging Face πŸ€—

Inputs (3)

NameTypeDefaultDescription
datasetHUGGINGFACE_DATASETDataset whose column to rename (from the πŸ€— Dataset Loader or another dataset node).
original_columnSTRINGName of the column to rename.
new_columnSTRINGNew name for the column.

Outputs (1)

NameTypeDescription
datasetHUGGINGFACE_DATASETThe dataset with the renamed column.