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
- Split-Apply-Combine Explained
- Multiple Aggregations With agg
- Group by Several Keys
- transform for Group-Wise Features