# 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('53d9f45f-4f30-4347-8863-400b99d4220e','c99e9d3a-0150-4dff-be13-b544dc2457f4','505dd1f5-ac2f-4a22-8283-8641e3e8f401','../lite/tree/../notebooks/index.html?path=d75e310e_2680_4fd4_a48a_6c026f00adbe.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="505dd1f5-ac2f-4a22-8283-8641e3e8f401" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('53d9f45f-4f30-4347-8863-400b99d4220e','505dd1f5-ac2f-4a22-8283-8641e3e8f401')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('53d9f45f-4f30-4347-8863-400b99d4220e','505dd1f5-ac2f-4a22-8283-8641e3e8f401')">Open In Tab</button></div><div id="c99e9d3a-0150-4dff-be13-b544dc2457f4" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
