Pandas data engineering interview problem. Difficulty: beginner. Pattern: GroupBy. About 12 minutes. Free to practice.
Per-region totals, average, count, and max amount in pandas. Treat this as a production helper: match the contracted return shape, including empty and duplicate inputs.
From sales, group by region and compute total_amount, avg_amount, txn_count, max_amount. Sort by region. Assign result.
Input: sales Output: region | total_amount | avg_amount | txn_count | max_amount EU | 70.0 | 35.0 | 2 | 40.0 US | 140.0 | 35.0 | 4 | 60.0 Named aggregations keep column contracts clear.
Topics: lakebench, pandas, groupby, agg.
More interview problems · All interview problems · Learn data engineering
Interview-style drill: Per-region totals, average, count, and max amount in pandas.
From `sales`, group by `region` and compute `total_amount`, `avg_amount`, `txn_count`, `max_amount`. Sort by `region`. Assign `result`.