January 2019
Beginner to intermediate
154 pages
4h 31m
English
The top() action returns the top N elements from the RDD. The following code returns the top 2 elements from an RDD:
#Pythonspark.sparkContext.parallelize(range(10)).top(2)Out[28]: [9, 8]
Read now
Unlock full access