I want to aggregate indices of a dataframe with groupby function.
word count
0 a 3
1 the 5
2 a 3
3 an 2
4 the 1
What I want is a pd.Series which consists of list(descending order) of indices,
word
a [2, 0]
an [3]
the [4, 1]
I've tried some built-in functions with groupby, however, I couldn't find a way to aggregate indices. Would you like to provide any hint or solution for this problem?
tagandcountcolumns?