Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Python
Compute the mean of this RDD’s elements.
Shahab Samkan
Programming language:
Python
2021-07-07 07:35:10
0
Q:
Compute the mean of this RDD’s elements.
Mr. Mister
Code:
Python
2021-03-17 11:04:12
sc.parallelize([1, 2, 3]).mean() # 2.0
0
Tags
element
Related
Aggregate the elements of each partition, and then the results for all the partitions
Return a new RDD containing the distinct elements in this RDD.
Compute the Inverse Document Frequency
Return a new RDD by applying a function to each element of this RDD.
Compute the variance of this RDD’s elements
Return the number of elements in this RDD.
Applies a function to all elements of this RDD.
Sorts this RDD by the given keyfunc
Return the intersection of this RDD and another one
Return an RDD of grouped items.
New to Communities?
Join the community