pandas.Index.droplevel
- final Index.droplevel(level=0)
Return index with requested level(s) removed.
If resulting index has only 1 level left, the result will be of Index type, not MultiIndex. The original index is not modified inplace.
- 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