# xarray.CFTimeIndex.item

#### CFTimeIndex.item()[[source]](https://github.com/pydata/xarray/blob/main/xarray/../.pixi/envs/doc/lib/python3.14/site-packages/pandas/core/base.py#L393-L427)

Return the first element of the underlying data as a Python scalar.

* **Returns:**
  [scalar](../user-guide/terminology.html.md#term-scalar) – The first element of Series or Index.
* **Raises:**
  [**ValueError**](https://docs.python.org/3/builtins/exceptions.html#ValueError) – If the data is not length = 1.

#### SEE ALSO
`Index.values`
: Returns an array representing the data in the Index.

`Series.head`
: Returns the first n rows.

### Examples

<div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesShowIframe('1027dc1f-4dc5-4c78-a3de-44eeb0934c51','4267f97b-96ec-400a-9dfd-3c1cf2f5a349','a637c435-dd51-4667-8c15-57c52e82dd0f','../lite/tree/../notebooks/index.html?path=91970d86_7750_480a_ab0e_4b94ec5fc5e7.ipynb','None')">Try it in your browser!</button></div>
```pycon
>>> s = pd.Series([1])
>>> s.item()
1
```

For an index:

```pycon
>>> s = pd.Series([1], index=["a"])
>>> s.index.item()
'a'
```

<div id="a637c435-dd51-4667-8c15-57c52e82dd0f" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('1027dc1f-4dc5-4c78-a3de-44eeb0934c51','a637c435-dd51-4667-8c15-57c52e82dd0f')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('1027dc1f-4dc5-4c78-a3de-44eeb0934c51','a637c435-dd51-4667-8c15-57c52e82dd0f')">Open In Tab</button></div><div id="4267f97b-96ec-400a-9dfd-3c1cf2f5a349" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
