HF RL Explorer

Task: Select Latest Record in Each Group from a Pandas DataFrame

Task: Select Latest Record in Each Group from a Pandas DataFrame: a task in Terminal-Lego-15k (Harbor dataset). Write a Python script that reads a CSV file containing records with id , product , and date columns, groups the records by id , and selects the latest (most recent date) record from each…

The task

Write a Python script that reads a CSV file containing records with `id`, `product`, and `date` columns, groups the records by `id`, and selects the latest (most recent date) record from each group. The result should be saved to an output CSV file.

Part of PrimeIntellect/Terminal-Lego-15k.