# xarray.CFTimeIndex.delete

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

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

Returns a new Index with the entries at the given positional
location(s) removed. The original Index is not modified.

* **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('5e7ba1db-22be-4f9b-b950-888e8ab95ab1','9dee2033-82d3-4c0c-8ce6-0526d2fc7b32','10070bc1-570d-43df-b860-992b4a6df28c','../lite/tree/../notebooks/index.html?path=4a608103_d6b0_47a4_8f49_b8dbb931cbca.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="10070bc1-570d-43df-b860-992b4a6df28c" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('5e7ba1db-22be-4f9b-b950-888e8ab95ab1','10070bc1-570d-43df-b860-992b4a6df28c')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('5e7ba1db-22be-4f9b-b950-888e8ab95ab1','10070bc1-570d-43df-b860-992b4a6df28c')">Open In Tab</button></div><div id="9dee2033-82d3-4c0c-8ce6-0526d2fc7b32" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
