# xarray.CFTimeIndex.argmax

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

Return int position of the largest value in the Index.

If the maximum is achieved in multiple locations,
the first row position is returned.

* **Parameters:**
  * **axis** ([`None`](https://docs.python.org/3/builtins/constants.html#None)) – Unused. Parameter needed for compatibility with DataFrame.
  * **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. If the entire Series is NA, or if `skipna=False`
    and there is an NA value, this method will raise a `ValueError`.
  * **\*args, \*\*kwargs** – Additional arguments and keywords for compatibility with NumPy.
* **Returns:**
  [`int`](https://docs.python.org/3/builtins/functions.html#int) – Row position of the maximum value.

#### SEE ALSO
`Series.argmax`
: Return position of the maximum value.

`Series.argmin`
: Return position of the minimum value.

[`numpy.ndarray.argmax`](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.argmax.html#numpy.ndarray.argmax)
: Equivalent method for numpy arrays.

`Series.idxmax`
: Return index label of the maximum values.

`Series.idxmin`
: Return index label of the minimum values.

### Examples

<div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesShowIframe('f1ed0688-2743-45d1-8fba-79c29726e2dc','7e437ac2-7095-4f6c-88cc-6ebd55a0924c','41f1995f-5231-4ac2-9e72-8884a22025b3','../lite/tree/../notebooks/index.html?path=12792d43_cae4_44d4_8962_42da94e41722.ipynb','None')">Try it in your browser!</button></div>

Consider dataset containing cereal calories

```pycon
>>> idx = pd.Index([100.0, 110.0, 120.0, 110.0])
>>> idx
Index([100.0, 110.0, 120.0, 110.0], dtype='float64')
```

```pycon
>>> idx.argmax()
np.int64(2)
>>> idx.argmin()
np.int64(0)
```

The maximum cereal calories is the third element and
the minimum cereal calories is the first element,
since index is zero-indexed.

<div id="41f1995f-5231-4ac2-9e72-8884a22025b3" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('f1ed0688-2743-45d1-8fba-79c29726e2dc','41f1995f-5231-4ac2-9e72-8884a22025b3')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('f1ed0688-2743-45d1-8fba-79c29726e2dc','41f1995f-5231-4ac2-9e72-8884a22025b3')">Open In Tab</button></div><div id="7e437ac2-7095-4f6c-88cc-6ebd55a0924c" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
