spark reduce python list code example Example: pyspark reduce a list RDD.takeOrdered(5, key = lambda x: x[0])