Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Python
Return a new RDD containing the distinct elements in this RDD.
Karolini
Programming language:
Python
2021-07-26 00:14:09
0
Q:
Return a new RDD containing the distinct elements in this RDD.
d_b
Code:
Python
2021-08-02 16:11:25
sorted(sc.parallelize([1, 1, 2, 3]).distinct().collect()) # [1, 2, 3]
0
Tags
new
element
con
turn
return
Related
pandas count distinct values in a column
Return an RDD created by coalescing all elements within each partition into a list.
Sorts this RDD by the given keyfunc
Return an RDD of grouped items.
Return an RDD containing all pairs of elements with matching keys in self and other.
Group the values for each key in the RDD into a single sequence.
pandas groupby column count distinct values
how to get distinct value in a column dataframe in python
Aggregate the elements of each partition, and then the results for all the partitions
Returns a new DataFrame containing the distinct rows in this DataFrame
distinct rows in this DataFrame
Return a new RDD containing only the elements that satisfy a predicate.
New to Communities?
Join the community