Answers for "Return an RDD containing all pairs of elements with matching keys in self and other."

0

Return an RDD containing all pairs of elements with matching keys in self and other.

x = sc.parallelize([("a", 1), ("b", 4)])
y = sc.parallelize([("a", 2), ("a", 3)])
sorted(x.join(y).collect())
# [('a', (1, 2)), ('a', (1, 3))]
Posted by: Guest on March-11-2020

Code answers related to "Return an RDD containing all pairs of elements with matching keys in self and other."

Python Answers by Framework

Browse Popular Code Answers by Language