@property
    def labels(self):
        # this was index_int, but that's not a very good name...
        if hasattr(self.index, 'labels'):
            return self.index.labels
        else:  # pandas version issue here
            # Compat code for the labels -> codes change in pandas 0.15
            # FIXME: use .codes directly when we don't want to support
            # pandas < 0.15
            tmp = pd.Categorical(self.index)
            try:
                labl = tmp.codes
            except __HOLE__:
                labl = tmp.labels  # Old pandsd

            return labl[None]
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/tools/grouputils.py/Grouping.labels