# 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('ce2982cc-942a-44b3-91a4-f68b00f105a2','94970c36-8c2b-4e12-9c05-487f96feefea','46b718d2-5c62-49b4-b7a8-c66ca8a7ea84','../lite/tree/../notebooks/index.html?path=52b8a5f7_09dd_4b4d_8b0b_caf935b31df4.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="46b718d2-5c62-49b4-b7a8-c66ca8a7ea84" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('ce2982cc-942a-44b3-91a4-f68b00f105a2','46b718d2-5c62-49b4-b7a8-c66ca8a7ea84')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('ce2982cc-942a-44b3-91a4-f68b00f105a2','46b718d2-5c62-49b4-b7a8-c66ca8a7ea84')">Open In Tab</button></div><div id="94970c36-8c2b-4e12-9c05-487f96feefea" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
