Answers for "Return the intersection of this RDD and another one"

0

Return the intersection of this RDD and another one

rdd1 = sc.parallelize([1, 10, 2, 3, 4, 5])
rdd2 = sc.parallelize([1, 6, 2, 3, 7, 8])
rdd1.intersection(rdd2).collect()
# [1, 2, 3]
Posted by: Guest on March-11-2020

Code answers related to "Return the intersection of this RDD and another one"

Python Answers by Framework

Browse Popular Code Answers by Language