pyspark.RDD.min

RDD.min(key=None)[source]

Find the minimum item in this RDD.

Parameters
keyfunction, optional

A function used to generate key for comparing

Examples

>>> rdd = sc.parallelize([2.0, 5.0, 43.0, 10.0])
>>> rdd.min()
2.0
>>> rdd.min(key=str)
10.0