# xarray.CFTimeIndex.drop

#### CFTimeIndex.drop(labels, errors='raise')[[source]](https://github.com/pydata/xarray/blob/main/xarray/../.pixi/envs/doc/lib/python3.15/site-packages/pandas/core/indexes/base.py#L7576-L7628)

Make new Index with passed list of labels deleted.

Unlike `Index.delete()`, which accepts positional indices, this
method removes entries by their label values. The original Index is
not modified.

* **Parameters:**
  * **labels** ([array-like](https://numpy.org/doc/stable/glossary.html#term-array_like) or [scalar](../user-guide/terminology.html.md#term-scalar)) – Array-like object or a scalar value, representing the labels to be removed
    from the Index.
  * **errors** (`{'ignore', 'raise'}`, *default* `'raise'`) – If ‘ignore’, suppress error and existing labels are dropped.
* **Returns:**
  [`Index`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Index.html#pandas.Index) – Will be same type as self, except for RangeIndex.
* **Raises:**
  [**KeyError**](https://docs.python.org/3/builtins/exceptions.html#KeyError) – If not all of the labels are found in the selected axis

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

`Index.drop_duplicates`
: Return Index with duplicate values removed.

### Examples

<div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesShowIframe('652199dc-4021-4ed0-8f1d-450b20e372d8','326332ed-b4e3-4aee-8fba-96b70a207f36','5875636e-cc64-4d08-9230-d3b1168309ec','../lite/tree/../notebooks/index.html?path=32f40e85_283e_4a0a_a20e_34718d1f79ad.ipynb','None')">Try it in your browser!</button></div>
```pycon
>>> idx = pd.Index(["a", "b", "c"])
>>> idx.drop(["a"])
Index(['b', 'c'], dtype='str')
```

<div id="5875636e-cc64-4d08-9230-d3b1168309ec" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('652199dc-4021-4ed0-8f1d-450b20e372d8','5875636e-cc64-4d08-9230-d3b1168309ec')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('652199dc-4021-4ed0-8f1d-450b20e372d8','5875636e-cc64-4d08-9230-d3b1168309ec')">Open In Tab</button></div><div id="326332ed-b4e3-4aee-8fba-96b70a207f36" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
