def reorder_levels(self, order):
order = [self._get_level_number(i) for i in order]<EOL>if len(order) != self.nlevels:<EOL><INDENT>raise AssertionError('<STR_LIT>'<EOL>'<STR_LIT>' %<EOL>(self.nlevels, len(order)))<EOL><DEDENT>new_levels = [self.levels[i] for i in order]<EOL>new_codes = [self.codes[i] for i in order]<EOL>new_names = [self.names[i] for i in order]<EOL>return MultiIndex(levels=new_levels, codes=new_codes,<EOL>names=new_names, verify_integrity=False)<EOL>
Rearrange levels using input order. May not drop or duplicate levels

Parameters
----------