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
Series
and its indexDetermining the shape of a
Series
objectHeads, tails, uniqueness, and counts of values
Looking up values in a
Series
objectBoolean selection
Alignment via index labels
Arithmetic operations on a
Series
objectReindexing a
Series
objectApplying arithmetic operations on
Series
objectsThe special case...