Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Return a new RDD containing the distinct elements in this RDD.

sorted(sc.parallelize([1, 1, 2, 3]).distinct().collect())
# [1, 2, 3]
Source by spark.apache.org #
 
PREVIOUS NEXT
Tagged: #Return #RDD #distinct #elements
ADD COMMENT
Topic
Name
7+6 =