

def groupby(self, to_groupby):
    '\n        Group the index labels by a given array of values.\n\n        Parameters\n        ----------\n        to_groupby : array\n            Values used to determine the groups.\n\n        Returns\n        -------\n        groups : dict\n            {group name -> group labels}\n        '
    return self._groupby(self.values, _values_from_object(to_groupby))

dataset/ETHPy150Open pydata/pandas/pandas/indexes/base.py Index.groupby/original