# 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('11eac956-3216-460e-8e96-e117e99f3bc3','713e8b29-bb60-46ad-bfc2-9c0cf32c745c','236b6a8c-fa09-4242-9367-1048abcb1ab8','../lite/tree/../notebooks/index.html?path=37afb154_b3fb_44aa_8a78_188670febb1b.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="236b6a8c-fa09-4242-9367-1048abcb1ab8" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('11eac956-3216-460e-8e96-e117e99f3bc3','236b6a8c-fa09-4242-9367-1048abcb1ab8')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('11eac956-3216-460e-8e96-e117e99f3bc3','236b6a8c-fa09-4242-9367-1048abcb1ab8')">Open In Tab</button></div><div id="713e8b29-bb60-46ad-bfc2-9c0cf32c745c" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
