filter in pyspark rdd code example Example: pyspark rdd filter kv_RDD.filter(lambda x: x[1] > 0) # keep only positive temperatures