pyspark.pandas.Index.min

Index.min() → 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 minimum value of the Index.

Returns
scalar

Minimum value.

See also

Index.max

Return the maximum value of the object.

Series.min

Return the minimum value in a Series.

DataFrame.min

Return the minimum values in a DataFrame.

Examples

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

For a MultiIndex, the maximum is determined lexicographically.

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