Getting all but the first k rows from a group in a GroupBy object
Yesy, You can use reindex the new dataframe using the reset_index() method.
I have a pandas GroupBy object. I am using head(k) to extract the first k elements of each group into a dataframe and I want to also extract the complement. Each group has a nonconstant size.
Is there any straightforwards way of doing this?