def __unicode__(self):
        _maxlen = 10
        if len(self._codes) > _maxlen:
            result = self._tidy_repr(_maxlen)
        elif len(self._codes) > 0:
            result = self._get_repr(length=len(self) > _maxlen)
        else:
            result = ('[], %s' %
                      self._get_repr(length=False,
                                     footer=True, ).replace("\n", ", "))

        return result
Unicode representation.
dataset/ETHPy150Open pydata/pandas/pandas/core/categorical.py/Categorical.__unicode__