Chapter 4. The pandas Series Object
pandas is a high-performance library that provides a comprehensive set of data structures for manipulating tabular data, providing high-performance indexing, automatic alignment, reshaping, grouping, joining, and statistical analyses capabilities.
The two primary data structures in pandas are the Series and the DataFrame objects. In this chapter, we will examine the Series object and how it builds on the features of a NumPy ndarray to provide operations such as indexing, axis labeling, alignment, handling of missing data, and merging across multiple series of data.
In this chapter, we will cover the following topics:
- Creating and initializing a
Seriesand its index - Determining the shape of a
Seriesobject - Heads, tails, uniqueness, and counts of values
- Looking up values in a
Seriesobject - Boolean selection
- Alignment via index labels
- Arithmetic operations on a
Seriesobject - Reindexing a
Seriesobject - Applying arithmetic operations on
Seriesobjects - The special...