# xarray.CFTimeIndex.notna

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

Detect existing (non-missing) values.

Return a boolean same-sized object indicating if the values are not NA.
Non-missing values get mapped to `True`. Characters such as empty
strings `''` or `numpy.inf` are not considered NA values.
NA values, such as None or `numpy.NaN`, get mapped to `False`
values.

* **Returns:**
  `numpy.ndarray[bool]` – Boolean array to indicate which entries are not NA.

#### SEE ALSO
`Index.notnull`
: Alias of notna.

`Index.isna`
: Inverse of notna.

[`notna`](#xarray.CFTimeIndex.notna)
: Top-level notna.

### Examples

<div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesShowIframe('f1313941-32ad-4c5c-b57a-98a82c8d30dc','ebd213ca-e955-442c-bfa3-eaa5f67c51e4','8f2bc6e9-1e43-45ff-89d6-7165ce341fa3','../lite/tree/../notebooks/index.html?path=dd986958_859b_4249_aa42_192339f1c659.ipynb','None')">Try it in your browser!</button></div>

Show which entries in an Index are not NA. The result is an
array.

```pycon
>>> idx = pd.Index([5.2, 6.0, np.nan])
>>> idx
Index([5.2, 6.0, nan], dtype='float64')
>>> idx.notna()
array([ True,  True, False])
```

Empty strings are not considered NA values. None is considered a NA
value.

```pycon
>>> idx = pd.Index(["black", "", "red", None])
>>> idx
Index(['black', '', 'red', nan], dtype='str')
>>> idx.notna()
array([ True,  True,  True, False])
```

<div id="8f2bc6e9-1e43-45ff-89d6-7165ce341fa3" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('f1313941-32ad-4c5c-b57a-98a82c8d30dc','8f2bc6e9-1e43-45ff-89d6-7165ce341fa3')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('f1313941-32ad-4c5c-b57a-98a82c8d30dc','8f2bc6e9-1e43-45ff-89d6-7165ce341fa3')">Open In Tab</button></div><div id="ebd213ca-e955-442c-bfa3-eaa5f67c51e4" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
