# xarray.CFTimeIndex.insert

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

Make new Index inserting new item at location.

Follows Python numpy.insert semantics for negative values.

* **Parameters:**
  * **loc** ([`int`](https://docs.python.org/3/builtins/functions.html#int)) – The integer location where the new item will be inserted.
  * **item** ([`object`](https://docs.python.org/3/builtins/functions.html#object)) – The new item to be inserted into the Index.
* **Returns:**
  [`Index`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Index.html#pandas.Index) – Returns a new Index object resulting from inserting the specified item at
  the specified location within the original Index.

#### SEE ALSO
`Index.append`
: Append a collection of Indexes together.

### Examples

<div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesShowIframe('f8cf265e-ba63-480c-80b8-39e927c73af5','c96ce0fb-f5f7-4b7c-b603-521e63ba3002','02dc8b16-ac47-4c43-a2be-4ff1247b5ab8','../lite/tree/../notebooks/index.html?path=c322ac04_0410_4269_b5d3_c6ec7898a679.ipynb','None')">Try it in your browser!</button></div>
```pycon
>>> idx = pd.Index(["a", "b", "c"])
>>> idx.insert(1, "x")
Index(['a', 'x', 'b', 'c'], dtype='str')
```

<div id="02dc8b16-ac47-4c43-a2be-4ff1247b5ab8" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('f8cf265e-ba63-480c-80b8-39e927c73af5','02dc8b16-ac47-4c43-a2be-4ff1247b5ab8')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('f8cf265e-ba63-480c-80b8-39e927c73af5','02dc8b16-ac47-4c43-a2be-4ff1247b5ab8')">Open In Tab</button></div><div id="c96ce0fb-f5f7-4b7c-b603-521e63ba3002" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
