Lesson 2.3

groupby and aggregation

Split, apply, combine is the pattern behind nearly every summary table you will ever produce.

11mBeginner23,325 students
Video thumbnail for groupby and aggregation

Sign in to watch this lesson

Browsing is free. Create an account to play videos and track your progress.

Overview

Split, apply, combine is the pattern behind nearly every summary table you will ever produce.

What this lesson covers

  • Group rows and aggregate each group
  • Apply several aggregations at once
  • Pivot and reshape a summary for presentation

This lesson sits in pandas Essentials, part of Python for Data Work. It assumes what came before it and leads directly into the next lesson in the module.

In this lesson you will:

  • Group rows and aggregate each group
  • Apply several aggregations at once
  • Pivot and reshape a summary for presentation

Pro Tip

Think split-apply-combine. Almost every reporting question is a groupby wearing a disguise.

groupby and aggregation — Skiply