Likewise about a docstring here. 

Also, I don't like enumerating over self._categories, since it involves many passes over the data. I think something along these lines should be faster:
```
self._data = np.searchsorted(self._categories, self._categorical_data)   # self._categories must be sorted, and you have to handle the case where self._categorical_data has elements not in self._categories
```