# 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('85fb4b2a-fc5c-4909-bfab-75d79f822179','5932409e-0f64-42e9-b57b-cd0cb5e5e796','52866496-94e5-4de1-a098-c3868d1c5d9c','../lite/tree/../notebooks/index.html?path=d4f6bd58_7355_4d52_aab3_2b73afb1e0dd.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="52866496-94e5-4de1-a098-c3868d1c5d9c" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('85fb4b2a-fc5c-4909-bfab-75d79f822179','52866496-94e5-4de1-a098-c3868d1c5d9c')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('85fb4b2a-fc5c-4909-bfab-75d79f822179','52866496-94e5-4de1-a098-c3868d1c5d9c')">Open In Tab</button></div><div id="5932409e-0f64-42e9-b57b-cd0cb5e5e796" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
