Return a new RDD containing the distinct elements in this RDD.
sorted(sc.parallelize([1, 1, 2, 3]).distinct().collect())
# [1, 2, 3]
Are there any code examples left?
New code examples in category Python
sorted(sc.parallelize([1, 1, 2, 3]).distinct().collect())
# [1, 2, 3]