O'Reilly logo

Mastering Exploratory Analysis with pandas by Harish Garg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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' ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required