Nodes/ComfyUI-Data-Analysis/Pandas Create Series From List
ComfyUI Node

Pandas Create Series From List

The simplest way to get a Series onto your canvas

By HowToSD·Created 2 years ago·Updated about a year ago· 23
Pandas Create Series From List
  • data
  • PDSERIES

If Pandas Create Series From Dict is the labeled version, this is the lazy version - and there's nothing wrong with lazy. Pandas Create Series From List takes a plain Python list, one value per row, and hands you a PDSERIES with a default 0-based index. No keys, no labels, no thinking. If you just have a sequence of numbers you want as a Series, this is the node you reach for.

Mechanically it's pd.Series(data) on a PYLIST input. The list becomes the values, the index defaults to RangeIndex(0..n), and that's the entire node. If you want named row labels you're in the wrong place - that's the dict version, where keys become labels. Here the labels are the boring-but-predictable integers, which is exactly what you want when the position of each value is the information that matters.

The one validation it does: the input must actually be a list, or you get a ValueError. An empty list returns an empty Series instead of crashing, so you can wire an "empty" path through a workflow safely.

Why bother with a Series at all?

Series are the pack's one-dimensional currency, and they show up in the arithmetic nodes more than you'd expect. Pandas Div Series divides a DataFrame by a Series (each column divided elementwise by the Series), and Series come back out of selection nodes like Pandas Select Column As Series. Building one from a list is the fastest way to have one when a node wants it - type 1,2,3 into Py String To List, plug the result in here, done.

You'll also notice a pattern across the pack: there's a PandasCreateSeriesFromListIndexList sibling for when you need explicit index labels. This node is the one to use when you don't.

Inputs, outputs, install

Required: data (PYLIST). Output: PDSERIES. Nothing else to configure.

The pack isn't in base ComfyUI:

cd ComfyUI/custom_nodes
git clone https://github.com/HowToSD/ComfyUI-Data-Analysis.git
mv ComfyUI-Data-Analysis data-analysis
pip install -r requirements.txt

or via ComfyUI Manager (search "Data analysis") and restart. No GPU required, no model files - just the usual pandas/NumPy/matplotlib stack from requirements.txt. And the standing wiring reminder: PYLIST/PYDICT sockets are at the top-left corner of the text widget; the pack's own guide calls this out because everyone misses it once.

CategoryData Analysis

Inputs (1)

NameTypeDefaultDescription
dataPYLIST

Outputs (1)

NameTypeDescription
PDSERIESPDSERIES