Back to Course
Data Intelligence: NumPy & Pandas
Module 8 of 15
8. Analysis Patterns
1. Aggregation
The Split-Apply-Combine strategy.
- Split: Break data into groups (e.g., by 'Sector').
- Apply: Compute a function (e.g., 'mean').
- Combine: Glue it back together.
pythondf.groupby('Sector')['Revenue'].agg(['mean', 'max'])
2. Merging
Joining datasets like SQL.
python# Inner Join (Default) pd.merge(users, orders, on='user_id')