Using the groupby method

In this section, we will learn about using the groupby method to split and aggregate data into groups. We'll explore how the groupby method works by breaking it into parts. We'll demonstrate groupby with statistical and other methods. We will also learn how to do interesting things with the groupby method's ability to iterate over the group data.

We will start by importing the pandas module into our Jupyter notebook, as we did in the previous section:

import pandas as pd

We will then read in our CSV dataset:

data = pd.read_table('data-zillow.csv', sep=',')data.head()

Let's start by asking a question, and see if pandas' ...

Get Mastering Exploratory Analysis with pandas now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.