def _reverse_indexer(self):
categories = self.categories<EOL>r, counts = libalgos.groupsort_indexer(self.codes.astype('<STR_LIT>'),<EOL>categories.size)<EOL>counts = counts.cumsum()<EOL>result = (r[start:end] for start, end in zip(counts, counts[<NUM_LIT:1>:]))<EOL>result = dict(zip(categories, result))<EOL>return result<EOL>
Compute the inverse of a categorical, returning
a dict of categories -> indexers.

*This is an internal function*

Returns
-------
dict of categories -> indexers

Example
-------
In [1]: c = pd.Categorical(list('aabca'))

In [2]: c
Out[2]:
[a, a, b, c, a]
Categories (3, object): [a, b, c]

In [3]: c.categories
Out[3]: Index(['a', 'b', 'c'], dtype='object')

In [4]: c.codes
Out[4]: array([0, 0, 1, 2, 0], dtype=int8)

In [5]: c._reverse_indexer()
Out[5]: {'a': array([0, 1, 4]), 'b': array([2]), 'c': array([3])}