pyspark.pandas.MultiIndex.max

MultiIndex.max() → Union[int, float, bool, str, bytes, decimal.Decimal, datetime.date, datetime.datetime, None, Tuple[Union[int, float, bool, str, bytes, decimal.Decimal, datetime.date, datetime.datetime, None], …]]

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 = ps.Index([3, 2, 1])
>>> idx.max()
3
>>> idx = ps.Index(['c', 'b', 'a'])
>>> idx.max()
'c'

For a MultiIndex, the maximum is determined lexicographically.

>>> idx = ps.MultiIndex.from_tuples([('a', 'x', 1), ('b', 'y', 2)])
>>> idx.max()
('b', 'y', 2)