# 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('085f8d62-0ee0-45f0-842e-50e3b7c97869','1ee8de03-bf35-484c-903b-0f532feb9ff1','dc0aa726-e346-4b92-a950-b03006d5c5a9','../lite/tree/../notebooks/index.html?path=1b4ffd47_d274_4a10_9afe_64cfb1cfb8f9.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="dc0aa726-e346-4b92-a950-b03006d5c5a9" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('085f8d62-0ee0-45f0-842e-50e3b7c97869','dc0aa726-e346-4b92-a950-b03006d5c5a9')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('085f8d62-0ee0-45f0-842e-50e3b7c97869','dc0aa726-e346-4b92-a950-b03006d5c5a9')">Open In Tab</button></div><div id="1ee8de03-bf35-484c-903b-0f532feb9ff1" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
