def reorder_levels(self, order):
        if not isinstance(self.index, MultiIndex):  # pragma: no cover
            raise Exception('Can only reorder levels on a hierarchical axis.')

        result = self.copy()
        result.index = result.index.reorder_levels(order)
        return result
Rearrange index levels using input order. May not drop or duplicate
dataset/ETHPy150Open pydata/pandas/pandas/core/series.py/Series.reorder_levels