Table Of Contents

Search

Enter search terms or a module, class or function name.

pandas.Index.max

Index.max()[source]

Return the maximum value of the Index.

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)
Scroll To Top