# xarray.CFTimeIndex.hasnans

#### CFTimeIndex.hasnans

Return True if there are any NaNs.

Enables various performance speedups.

* **Returns:**
  [`bool`](https://docs.python.org/3/builtins/functions.html#bool)

#### SEE ALSO
`Index.isna`
: Detect missing values.

`Index.dropna`
: Return Index without NA/NaN values.

`Index.fillna`
: Fill NA/NaN values with the specified value.

### Examples

<div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesShowIframe('7cd8a171-91ef-4ee4-b80d-5cff263c7bce','2c6fb399-f2a4-40f8-82f1-c041698821d7','26d8fa84-881d-43d7-becf-635110d058c3','../lite/tree/../notebooks/index.html?path=652e9c7e_e0d8_4a25_91e1_06be174b25df.ipynb','None')">Try it in your browser!</button></div>
```pycon
>>> s = pd.Series([1, 2, 3], index=["a", "b", None])
>>> s
a    1
b    2
None 3
dtype: int64
>>> s.index.hasnans
True
```

<div id="26d8fa84-881d-43d7-becf-635110d058c3" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('7cd8a171-91ef-4ee4-b80d-5cff263c7bce','26d8fa84-881d-43d7-becf-635110d058c3')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('7cd8a171-91ef-4ee4-b80d-5cff263c7bce','26d8fa84-881d-43d7-becf-635110d058c3')">Open In Tab</button></div><div id="2c6fb399-f2a4-40f8-82f1-c041698821d7" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
