# xarray.CFTimeIndex.droplevel

#### CFTimeIndex.droplevel(level=0)[[source]](https://github.com/pydata/xarray/blob/main/xarray/../.pixi/envs/doc/lib/python3.14/site-packages/pandas/core/indexes/base.py#L2244-L2301)

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`](https://docs.python.org/3/builtins/functions.html#int), [`str`](https://docs.python.org/3/builtins/stdtypes.html#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`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Index.html#pandas.Index) or [`MultiIndex`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.MultiIndex.html#pandas.MultiIndex) – Returns an Index or MultiIndex object, depending on the resulting index
  after removing the requested level(s).

#### SEE ALSO
`Index.dropna`
: Return Index without NA/NaN values.

### Examples

<div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesShowIframe('d0c722b5-9578-4fa4-831d-f14b1ab58da5','1df9e222-b400-4519-9964-e5b554d225da','5c034086-2f13-4efd-8be6-627ab0937f89','../lite/tree/../notebooks/index.html?path=0da10f69_e071_470d_9cef_ab4e8b36f9c9.ipynb','None')">Try it in your browser!</button></div>
```pycon
>>> mi = pd.MultiIndex.from_arrays(
...     [[1, 2], [3, 4], [5, 6]], names=["x", "y", "z"]
... )
>>> mi
MultiIndex([(1, 3, 5),
            (2, 4, 6)],
           names=['x', 'y', 'z'])
```

```pycon
>>> mi.droplevel()
MultiIndex([(3, 5),
            (4, 6)],
           names=['y', 'z'])
```

```pycon
>>> mi.droplevel(2)
MultiIndex([(1, 3),
            (2, 4)],
           names=['x', 'y'])
```

```pycon
>>> mi.droplevel("z")
MultiIndex([(1, 3),
            (2, 4)],
           names=['x', 'y'])
```

```pycon
>>> mi.droplevel(["x", "y"])
Index([5, 6], dtype='int64', name='z')
```

<div id="5c034086-2f13-4efd-8be6-627ab0937f89" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('d0c722b5-9578-4fa4-831d-f14b1ab58da5','5c034086-2f13-4efd-8be6-627ab0937f89')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('d0c722b5-9578-4fa4-831d-f14b1ab58da5','5c034086-2f13-4efd-8be6-627ab0937f89')">Open In Tab</button></div><div id="1df9e222-b400-4519-9964-e5b554d225da" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
