Book Image

Learning pandas - Second Edition

By : Michael Heydt
Book Image

Learning pandas - Second Edition

By: Michael Heydt

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)

Accessing data within a DataFrame

A data frame consists of both rows and columns, and has constructs to select data from specific rows and columns. These selections use the same operators as a Series, including [], .loc[], and .iloc[].

Because of the multiple dimensions, the process by which these are applied differs slightly. We will examine these by first learning to select columns, then rows, a combination of rows and columns in a single statement, and also by using Boolean selections.

Additionally, pandas provides a construct for selecting a single scalar value at a specific row and column that we will investigate. This technique is important and exists because it is a very high-performance means of accessing these values.

Selecting the columns of a DataFrame

...