# xarray.CFTimeIndex.delete

#### CFTimeIndex.delete(loc)[[source]](https://github.com/pydata/xarray/blob/main/xarray/../.pixi/envs/doc/lib/python3.14/site-packages/pandas/core/indexes/base.py#L7101-L7141)

Make new Index with passed location(-s) deleted.

* **Parameters:**
  **loc** ([`int`](https://docs.python.org/3/builtins/functions.html#int) or [`list`](https://docs.python.org/3/builtins/stdtypes.html#list) of [`int`](https://docs.python.org/3/builtins/functions.html#int)) – Location of item(-s) which will be deleted.
  Use a list of locations to delete more than one value at the same time.
* **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.

#### SEE ALSO
[`numpy.delete`](https://numpy.org/doc/stable/reference/generated/numpy.delete.html#numpy.delete)
: Delete any rows and column from NumPy array (ndarray).

### Examples

<div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesShowIframe('fdb8a384-2c88-48ce-b2f5-06331b80f5be','1a990cb9-780a-437b-aa8d-73759a8d05a5','c6cafd8f-ed85-44b3-a35e-046f56a1a605','../lite/tree/../notebooks/index.html?path=61903e9c_7595_4eb4_8eb5_88888bbe086f.ipynb','None')">Try it in your browser!</button></div>
```pycon
>>> idx = pd.Index(["a", "b", "c"])
>>> idx.delete(1)
Index(['a', 'c'], dtype='str')
```

```pycon
>>> idx = pd.Index(["a", "b", "c"])
>>> idx.delete([0, 2])
Index(['b'], dtype='str')
```

<div id="c6cafd8f-ed85-44b3-a35e-046f56a1a605" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('fdb8a384-2c88-48ce-b2f5-06331b80f5be','c6cafd8f-ed85-44b3-a35e-046f56a1a605')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('fdb8a384-2c88-48ce-b2f5-06331b80f5be','c6cafd8f-ed85-44b3-a35e-046f56a1a605')">Open In Tab</button></div><div id="1a990cb9-780a-437b-aa8d-73759a8d05a5" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
