Core pandas · Lesson 6 of 10

Grouping and sorting

Real insight often comes from grouping: total sales per seller, average score per city.

  • groupby("col") gathers rows that share a value, so you can summarize each group
  • sort_values("col") puts the table in order
Python

Group, then summarize: this is one of the most powerful moves in all of data analysis.

Exercise

You’re reading for free. Sign in to save your progress, ask questions on any lesson, and earn a certificate when you finish.Sign in to keep my progress →

Lesson 6 of 10