pandas.MultiIndex.droplevel
-
MultiIndex.droplevel(level=0)
[source] -
Return index with requested level(s) removed.
If resulting index has only 1 level left, the result will be of Index type, not MultiIndex.
New in version 0.23.1: (support for non-MultiIndex)
Parameters: -
level : int, str, or list-like, default 0
-
If a string is given, must be the name of a level If list-like, elements must be names or indexes of levels.
Returns: -
index : Index or MultiIndex
-
© 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.MultiIndex.droplevel.html