What is the difference between agg(), transform(), and filter() when used with groupby()?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Other
Overview: Asks how pandas groupby agg(), transform() and filter() differ. Tests whether you can predict the shape and index of each result, pick the right method for group summaries, per-row group features and dropping whole groups, and avoid common predicate and alignment errors.