# 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('0cc88bbe-7536-4bbc-9bfd-64c77fcccb67','cb8a4838-547f-4aa0-b2e4-17598481b4a9','3b64f94a-7275-4e89-87a7-1e79d65e2425','../lite/tree/../notebooks/index.html?path=70fde127_31af_4807_9f12_357c5b0eb17a.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="3b64f94a-7275-4e89-87a7-1e79d65e2425" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('0cc88bbe-7536-4bbc-9bfd-64c77fcccb67','3b64f94a-7275-4e89-87a7-1e79d65e2425')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('0cc88bbe-7536-4bbc-9bfd-64c77fcccb67','3b64f94a-7275-4e89-87a7-1e79d65e2425')">Open In Tab</button></div><div id="cb8a4838-547f-4aa0-b2e4-17598481b4a9" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
