# xarray.CFTimeIndex.fillna

#### CFTimeIndex.fillna(value)[[source]](https://github.com/pydata/xarray/blob/main/xarray/../.pixi/envs/doc/lib/python3.15/site-packages/pandas/core/indexes/base.py#L2859-L2921)

Fill NA/NaN values with the specified value.

Returns a new Index with all NA/NaN entries replaced by the given
scalar value.

* **Parameters:**
  **value** ([scalar](../user-guide/terminology.html.md#term-scalar)) – Scalar value to use to fill holes (e.g. 0).
  This value cannot be a list-likes.
* **Returns:**
  [`Index`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Index.html#pandas.Index) – NA/NaN values replaced with value.

#### SEE ALSO
`DataFrame.fillna`
: Fill NaN values of a DataFrame.

`Series.fillna`
: Fill NaN Values of a Series.

### Examples

<div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesShowIframe('caf3991f-944b-4517-ad54-c7a8035dbc05','43f5e166-958f-46c9-bb9c-3d12aa12af4d','17e29edd-3e04-492a-a94d-6e5c1d44a45d','../lite/tree/../notebooks/index.html?path=d83ef24f_b6c4_4f22_88e5_ec86344dd51e.ipynb','None')">Try it in your browser!</button></div>
```pycon
>>> idx = pd.Index([np.nan, np.nan, 3])
>>> idx.fillna(0)
Index([0.0, 0.0, 3.0], dtype='float64')
```

<div id="17e29edd-3e04-492a-a94d-6e5c1d44a45d" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('caf3991f-944b-4517-ad54-c7a8035dbc05','17e29edd-3e04-492a-a94d-6e5c1d44a45d')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('caf3991f-944b-4517-ad54-c7a8035dbc05','17e29edd-3e04-492a-a94d-6e5c1d44a45d')">Open In Tab</button></div><div id="43f5e166-958f-46c9-bb9c-3d12aa12af4d" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
