Skip to main content
Albero Academy

The Series

A labelled 1-D column — the building block of every DataFrame.

Foundations8 min

A Series is a one-dimensional labelled array — think of a single spreadsheet column. It has values (a NumPy array underneath) and an index (the row labels). Every DataFrame column is a Series.

Creating a Series

values plus an index
import pandas as pd
s = pd.Series([6.5, 8.0, 7.25], name="package")
s.values # the underlying NumPy array
s.index # RangeIndex(start=0, stop=3)
# Custom index — labels instead of positions
s = pd.Series([6.5, 8.0], index=["Ana", "Ravi"])
s["Ana"] # 6.5 — look up by label

Vectorised, like NumPy

A Series inherits NumPy's vectorised operations and boolean masking, but keeps its labels aligned:

operations keep the index
s * 100000 # element-wise, index preserved
s[s > 7] # boolean filter
s.mean(), s.max() # aggregations

Key takeaways

  1. 01A Series is a labelled 1-D array: values (a NumPy array) plus an index of row labels.
  2. 02Look up by label (s["Ana"]) or position; every DataFrame column is a Series.
  3. 03It supports vectorised maths and boolean masking like NumPy, keeping labels aligned.
  4. 04Label alignment is pandas' superpower over raw NumPy.

Finished this chapter?

Mark it complete to track your progress through Pandas.