Series

Learn about the pandas Series object for 1-D data.

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 is not set, pd.Series returns an empty Series. Since the data ...