I have a dataframe with three columns, shown below.
What I would like to do is get the minimum date for each id & the score on that day.
id date score
124 2020-01-01 3.4
124 2020-01-02 3.11
124 2020-01-03 2.97
124 2020-01-04 3.64
477 2020-04-03 0.9
477 2020-04-04 0.7
477 2020-04-05 1.1
477 2020-04-08 0.5
The output I'm looking for,
id date score
124 2020-01-01 3.4
124 2020-04-03 0.9
I am able to get the minimum date by using the groupby but not the score to go with it. I tried the agg function but think I'm using it wrong