Book Image

Learning pandas. - Second Edition

Book Image

Learning pandas. - Second Edition

Overview of this book

You will learn how to use pandas to perform data analysis in Python. You will start with an overview of data analysis and iteratively progress from modeling data, to accessing data from remote sources, performing numeric and statistical analysis, through indexing and performing aggregate analysis, and finally to visualizing statistical data and applying pandas to finance. With the knowledge you gain from this book, you will quickly learn pandas and how it can empower you in the exciting world of data manipulation, analysis and science.
Table of Contents (16 chapters)

Representing Univariate Data with the Series

The Series is the primary building block of pandas. It represents a one-dimensional array-like set of values of a single data type. It is often used to model zero or more measurements of a single variable. While it can appear like an array, a Series has an associated index that can be used to perform very efficient retrievals of values based upon labels.

A Series also performs automatic alignment of data between itself and other pandas objects. Alignment is a core feature of pandas where data is multiple pandas objects that are matched by label value before any operation is performed. This allows the simple application of operations without needing to explicitly code joins.

In this chapter, we will examine how to model measurements of a variable using a Series, including using an index to retrieve samples. This examination will include...