# xarray.CFTimeIndex.insert

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

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('ad1e61f7-ddeb-4c45-90fa-63e6daaf95c5','fae24b9a-86a6-4cae-bd0f-8f18a3878a0f','d51e8eb5-9a8d-46d9-9fbf-7afba350704d','../lite/tree/../notebooks/index.html?path=e2540738_980e_4cfd_8f86_3d608f608a16.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="d51e8eb5-9a8d-46d9-9fbf-7afba350704d" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('ad1e61f7-ddeb-4c45-90fa-63e6daaf95c5','d51e8eb5-9a8d-46d9-9fbf-7afba350704d')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('ad1e61f7-ddeb-4c45-90fa-63e6daaf95c5','d51e8eb5-9a8d-46d9-9fbf-7afba350704d')">Open In Tab</button></div><div id="fae24b9a-86a6-4cae-bd0f-8f18a3878a0f" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
