Book Image

Learning Pandas

By : Michael Heydt
Book Image

Learning Pandas

By: Michael Heydt

Overview of this book

Table of Contents (19 chapters)
Learning pandas
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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 Series and its index

  • Determining the shape of a Series object

  • Heads, tails, uniqueness, and counts of values

  • Looking up values in a Series object

  • Boolean selection

  • Alignment via index labels

  • Arithmetic operations on a Series object

  • Reindexing a Series object

  • Applying arithmetic operations on Series objects

  • The special case...