Answers for "Return the key-value pairs in this RDD to the master as a dictionary."

0

Return the key-value pairs in this RDD to the master as a dictionary.

m = sc.parallelize([(1, 2), (3, 4)]).collectAsMap()
m[1]
# 2
m[3]
# 4
Posted by: Guest on March-11-2020

Code answers related to "Return the key-value pairs in this RDD to the master as a dictionary."

Python Answers by Framework

Browse Popular Code Answers by Language