I have a dataframe as belwo.
And when I sort with A and value of B (assume ascending sort in this example),
I want to have sub index of each item like this