TensorLearn
Back to Course
Data Intelligence: NumPy & Pandas
Module 8 of 15

8. Analysis Patterns

1. Aggregation

The Split-Apply-Combine strategy.

  1. Split: Break data into groups (e.g., by 'Sector').
  2. Apply: Compute a function (e.g., 'mean').
  3. Combine: Glue it back together.
python
df.groupby('Sector')['Revenue'].agg(['mean', 'max'])

2. Merging

Joining datasets like SQL.

python
# Inner Join (Default) pd.merge(users, orders, on='user_id')

Mark as Completed

TensorLearn - AI Engineering for Professionals