NumPy allowed · plain Python earns 10 bonus points
Computed matrix × vector transformation
Group tabular records by category and compute aggregate metrics (count, sum, mean) using Pandas.
Implement groupby_aggregate(records, group_col, val_col). Given tabular rows, group by group_col and compute for each group its count (int), sum (float rounded to 2 decimals), and mean (float rounded to 2 decimals). Return a dictionary mapping group names to their metric dict.
groupby_aggregate(records: list[dict], group_col: str, val_col: str) -> dict