title: Aggregate dataframe indices in python
body: <p>I want to aggregate indices of a dataframe with groupby function.  </p>
  
  <pre><code>     word  count
  0    a     3
  1    the   5
  2    a     3
  3    an    2
  4    the   1
  </code></pre>
  
  <p>What I want is a pd.Series which consists of list(descending order) of indices,</p>
  
  <pre><code>word
  a       [2, 0]
  an         [3]
  the     [4, 1]
  </code></pre>
  
  <p>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?</p>