Suppose I have :
SM Week Capacity
A 0 1000
A 1 110
B 1 980
B 2 89
B 3 89
And I want to get :
SM Week Capacity
A 0 1000
B 1 980
In other words, I want to get only the rows where the week is the minimum in the group defined by SM. How can I do this in pandas, outside of iterating row by row to check manually?
Thanks.