W3cubDocs

/pandas 0.25

pandas.Index.max

Index.max(self, axis=None, skipna=True, *args, **kwargs) [source]

Return the maximum value of the Index.

Parameters:
axis : int, optional

For compatibility with NumPy. Only 0 or None are allowed.

skipna : bool, default True
Returns:
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

>>> idx = pd.Index([3, 2, 1])
>>> idx.max()
3
>>> idx = pd.Index(['c', 'b', 'a'])
>>> idx.max()
'c'

For a MultiIndex, the maximum is determined lexicographically.

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

© 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/0.25.0/reference/api/pandas.Index.max.html