Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Add up the elements in this RDD

# sum()

sc.parallelize([1.0, 2.0, 3.0]).sum()
# 6.0
Source by spark.apache.org #
 
PREVIOUS NEXT
Tagged: #Add #elements #RDD
ADD COMMENT
Topic
Name
6+1 =