Series
noun
say it: “SEER-eez” /ˈsɪriz/
In pandas, a single column of data with a label for each row, whose methods work on every value in it at once.
What is a Series in pandas?
A Series is one column of a pandas table, with the table's row labels. Its methods, such as sum(), mean() and
max(), work on the whole column at once.
import pandas as pd
sales = pd.DataFrame({"store": ["Main", "Elm"], "cups": [620, 410]})
cups = sales["cups"] # one column: a Series
print(cups.sum(), cups.max()) # 1030 620
In a sentence
- “Each column of the DataFrame is a Series.”
- “Picking the cups column gave a Series, and sum() added it up.”
Level: Journeyman · More Python terms at this level
Updated