I have a data frame index by column A.
How do I group by using that column with an additional one, e.g. [A, B] without resetting the index?
e.g. what I do today is df.reset_index().groupby([A,B]).apply(f) which I think might be not optimal because I am losing the prior indexing.
In my parquet file, A and B are already marked as index. How can I use the existing indexing to make group by A and B more efficient?
Moreover (might be unrelated) I see the CPU usage as very low as if there is a shuffling or io bottleneck.