RDD.
mean
Compute the mean of this RDD’s elements.
New in version 0.9.1.
the mean of all elements
See also
RDD.stats()
RDD.sum()
RDD.meanApprox()
Examples
>>> sc.parallelize([1, 2, 3]).mean() 2.0