spark reduce list of objects to single object code example Example: pyspark reduce a list RDD.takeOrdered(5, key = lambda x: x[0])