# xarray.CFTimeIndex.max

#### CFTimeIndex.max(axis=None, skipna=True, \*args, \*\*kwargs)[[source]](https://github.com/pydata/xarray/blob/main/xarray/../.pixi/envs/doc/lib/python3.15/site-packages/pandas/core/indexes/base.py#L8149-L8222)

Return the maximum value of the Index.

The maximum is computed by comparing all values in the Index.
NA/null values are excluded by default.

* **Parameters:**
  * **axis** ([`int`](https://docs.python.org/3/builtins/functions.html#int), *optional*) – For compatibility with NumPy. Only 0 or None are allowed.
  * **skipna** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool), *default* [`True`](https://docs.python.org/3/builtins/constants.html#True)) – Exclude NA/null values when showing the result.
  * **\*args, \*\*kwargs** – Additional arguments and keywords for compatibility with NumPy.
* **Returns:**
  [scalar](../user-guide/terminology.html.md#term-scalar) – Maximum value.

#### SEE ALSO
`Index.min`
: Return the minimum value in an Index.

`Series.max`
: Return the maximum value in a Series.

`DataFrame.max`
: Return the maximum values in a DataFrame.

### Examples

<div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesShowIframe('ffe4762a-c30d-496c-bc14-6d66f08702a1','59081e16-c608-47e5-8c80-f95ae0808217','cc87bc12-30e0-49c0-98e4-262e8f5a5f5f','../lite/tree/../notebooks/index.html?path=6dd22b40_c02c_47d1_a7c1_5ca87c768fbb.ipynb','None')">Try it in your browser!</button></div>
```pycon
>>> idx = pd.Index([3, 2, 1])
>>> idx.max()
3
```

```pycon
>>> idx = pd.Index(["c", "b", "a"])
>>> idx.max()
'c'
```

For a MultiIndex, the maximum is determined lexicographically.

```pycon
>>> idx = pd.MultiIndex.from_product([("a", "b"), (2, 1)])
>>> idx.max()
('b', 2)
```

<div id="cc87bc12-30e0-49c0-98e4-262e8f5a5f5f" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('ffe4762a-c30d-496c-bc14-6d66f08702a1','cc87bc12-30e0-49c0-98e4-262e8f5a5f5f')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('ffe4762a-c30d-496c-bc14-6d66f08702a1','cc87bc12-30e0-49c0-98e4-262e8f5a5f5f')">Open In Tab</button></div><div id="59081e16-c608-47e5-8c80-f95ae0808217" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
