Skip to main content
PyPath
Home
Courses
Courses
See both
1
Python Foundations
10 units
2
Python for Data
10 units
Sandbox
Classroom
My class
Settings
Start learning
Sign in
My progress
My classroom
Account
Sign out
Courses
·
Python for Data
Unit 7 · Grouping and Aggregating
Split the table, work on each part, and put the answers back together.
1
Split, Apply, Combine
The shape of every group-by, named once so the rest makes sense.
2
Counting Groups
How many of each, and the difference between size and count.
3
agg with Several Summaries
More than one answer per group, named as you want them.
4
Grouping by Several Keys
Two keys give a row per combination, and an index with two levels.
5
transform versus aggregate
One answer per group, or one answer per row.
6
Pivot Tables
A grouped summary laid out as a grid.