Python for Data · Unit 7

Unit 7: Grouping and Aggregating

Group pandas rows by category to get counts, totals and averages.

  • 2–3 hrs
  • Intermediate
  • 6 lessons

Lessons

  1. Split, Apply, CombineThe shape of every group-by, named once so the rest makes sense. 20–25 min
  2. Counting GroupsHow many of each, and the difference between size and count. 20–25 min
  3. agg with Several SummariesMore than one answer per group, named as you want them. 20–25 min
  4. Grouping by Several KeysTwo keys give a row per combination, and an index with two levels. 20–25 min
  5. transform versus aggregateOne answer per group, or one answer per row. 20–25 min
  6. Pivot TablesA grouped summary laid out as a grid. 20–25 min
  7. End of unit test

    Ten multiple choice questions and one free response problem. You need 70 to finish the unit. Retakes are unlimited and your best score is the one that counts.

    Take the Unit 7 test