Compute the mean of this RDD’s elements. code example Example: Compute the mean of this RDD’s elements. sc.parallelize([1, 2, 3]).mean() # 2.0