I have df:
id date group
1 1.1 3
1 2.1 3
1 3.1 5
1 4.1 5
2 5.2 2
2 6.2 1
2 9.2 1
2 12.2 1
3 15.3 15
3 20.3 20
I want for each group to get all the rows from the recent date . that means that in this df id 2 is the recent group(according to the date column) so I want to filter to display only rows of id 2. So the desire output:
id date group
1 3.1 5
1 4.1 5
2 6.2 1
2 9.2 1
2 12.2 1
3 20.3 20
thanks