I'm trying to drop a row at certain index in every group inside a GroupBy object.
The best I have been able to manage is:
import pandas as pd
x_train = x_train.groupby('ID')
x_train.apply(lambda x: x.drop([0], axis=0))
However, this doesn't work. I have spent a whole day on this to no solution, so have turned to stack.
Edit: A solution for any index value is needed as well