0Pricing
Data Science Academy · Lesson

Split-Apply-Combine Explained

The model behind every groupby.

One Idea, Three Steps

Every groupby follows one rhythm: split the rows into groups, apply a calculation to each, then combine the answers back together. 🔁

Split: Cut by a Key

The split step partitions rows by a key column, so all rows sharing the same value land in the same little group.

groups = df.groupby("city")

All lessons in this course

  1. Split-Apply-Combine Explained
  2. Multiple Aggregations With agg
  3. Group by Several Keys
  4. transform for Group-Wise Features
← Back to Data Science Academy