A pandas Series is a one-dimensional labeled array-like structure: each value corresponds to an index and typically represents one DataFrame column. Selecting a column with square brackets returns a Series with one element for each DataFrame row. section 6.3.1
Getting filter options from a column
In df['age_group'], the Series contains each row's age group. Calling .unique() creates a new Series containing only distinct groups; list(...) converts those values into a regular Python list for a filter. section 6.3.1
Listing 6.3 A simple function to get unique values in a column
def get_unique_values(df, column):
return list(df[column].unique())
Use the compact helper to extract distinct values from any selected DataFrame column. section 6.3.1



