Search⌘ K
AI Features

Series

Explore the pandas Series object and its key features for handling one-dimensional data. Learn to create Series from lists, NumPy arrays, and dictionaries, customize indices, and perform basic operations. This lesson equips you with practical skills to work efficiently with 1-D data in pandas for data analysis tasks.

Chapter Goals

  • Learn about the pandas Series object and its basic utilities
  • Write code to create several Series objects

A. 1-D data

Similar to NumPy, pandas frequently deals with 1-D and 2-D data. However, we use two separate objects to deal with 1-D and 2-D data in pandas. For 1-D data, we use the pandas.Series objects, which we'll refer to simply as a Series.

A Series is created through the pd.Series constructor, which takes in no required arguments but does have a variety of keyword arguments.

The first keyword argument is data, which specifies the elements of the Series. If data ...