I have df:
date id label pred
1/1 1 0 0.2
2/1 1 1 0.5
1/1 2 1 0.9
2/1 2 1 0.3
I want for each id, get the first row when label column equal to 1. for example desire df:
date id label pred
2/1 1 1 0.3
1/1 2 1 0.9
thx!