January 2019
Beginner to intermediate
154 pages
4h 31m
English
The take() action returns N number of elements from an RDD. The following code returns the first two elements from an RDD containing the numbers 0 to 9:
#Pythonspark.sparkContext.parallelize(range(10)).take(2)Out[27]: [0, 1]
Read now
Unlock full access