# xarray.CFTimeIndex.values

#### *property* CFTimeIndex.values

Return an array representing the data in the Index.

#### WARNING
We recommend using `Index.array` or
`Index.to_numpy()`, depending on whether you need
a reference to the underlying data or a NumPy array.

#### Versionchanged
Changed in version 3.0.0: The returned array is read-only.

* **Returns:**
  **array** ([`numpy.ndarray`](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray) or `ExtensionArray`)

#### SEE ALSO
`Index.array`
: Reference to the underlying data.

`Index.to_numpy`
: A NumPy array representing the underlying data.

### Examples

<div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesShowIframe('b8e16c88-9c1d-4c1d-a1e1-3c9ac14a7e8c','a8a93950-949b-4507-a067-27673c980bf3','d2b154c1-6a66-41e9-bb27-ee57cf3ec46b','../lite/tree/../notebooks/index.html?path=049a175f_d383_49fb_89e6_3475d626cbdc.ipynb','None')">Try it in your browser!</button></div>

For [`pandas.Index`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Index.html#pandas.Index):

```pycon
>>> idx = pd.Index([1, 2, 3])
>>> idx
Index([1, 2, 3], dtype='int64')
>>> idx.values
array([1, 2, 3])
```

For [`pandas.IntervalIndex`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.IntervalIndex.html#pandas.IntervalIndex):

```pycon
>>> idx = pd.interval_range(start=0, end=5)
>>> idx.values
<IntervalArray>
[(0, 1], (1, 2], (2, 3], (3, 4], (4, 5]]
Length: 5, dtype: interval[int64, right]
```

<div id="d2b154c1-6a66-41e9-bb27-ee57cf3ec46b" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('b8e16c88-9c1d-4c1d-a1e1-3c9ac14a7e8c','d2b154c1-6a66-41e9-bb27-ee57cf3ec46b')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('b8e16c88-9c1d-4c1d-a1e1-3c9ac14a7e8c','d2b154c1-6a66-41e9-bb27-ee57cf3ec46b')">Open In Tab</button></div><div id="a8a93950-949b-4507-a067-27673c980bf3" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
