# xarray.CFTimeIndex.empty

#### *property* CFTimeIndex.empty

Indicator whether Index is empty.

An Index is considered empty if it has no elements. This property can be
useful for quickly checking the state of an Index, especially in data
processing and analysis workflows where handling of empty datasets might
be required.

* **Returns:**
  [`bool`](https://docs.python.org/3/builtins/functions.html#bool) – If Index is empty, return True, if not return False.

#### SEE ALSO
`Index.size`
: Return the number of elements in the underlying data.

### Examples

<div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesShowIframe('27adae57-4d93-4aa8-8e6a-2506d03b8e81','e3e75e81-ecb0-4d82-8022-b14b36d079ae','9cb4f82a-d71f-46fe-a59e-e97d49ccc102','../lite/tree/../notebooks/index.html?path=9910a361_a403_4228_b0e4_a3a8856ca136.ipynb','None')">Try it in your browser!</button></div>
```pycon
>>> idx = pd.Index([1, 2, 3])
>>> idx
Index([1, 2, 3], dtype='int64')
>>> idx.empty
False
```

```pycon
>>> idx_empty = pd.Index([])
>>> idx_empty
Index([], dtype='object')
>>> idx_empty.empty
True
```

If we only have NaNs in our DataFrame, it is not considered empty!

```pycon
>>> idx = pd.Index([np.nan, np.nan])
>>> idx
Index([nan, nan], dtype='float64')
>>> idx.empty
False
```

<div id="9cb4f82a-d71f-46fe-a59e-e97d49ccc102" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('27adae57-4d93-4aa8-8e6a-2506d03b8e81','9cb4f82a-d71f-46fe-a59e-e97d49ccc102')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('27adae57-4d93-4aa8-8e6a-2506d03b8e81','9cb4f82a-d71f-46fe-a59e-e97d49ccc102')">Open In Tab</button></div><div id="e3e75e81-ecb0-4d82-8022-b14b36d079ae" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
