pandas.DataFrame.reorder_levels
-
DataFrame.reorder_levels(order, axis=0)
[source] -
Rearrange index levels using input order. May not drop or duplicate levels.
Parameters: -
order : list of int or list of str
-
List representing new level order. Reference level by number (position) or by key (label).
-
axis : int
-
Where to reorder levels.
Returns: - type of caller (new object)
-
© 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/0.24.2/reference/api/pandas.DataFrame.reorder_levels.html