Getting Started
User Guide
API Reference
Development
Migration Guide
Spark SQL
Structured Streaming
MLlib (DataFrame-based)
Spark Streaming
MLlib (RDD-based)
Spark Core
Resource Management
pyspark.RDD.sum
¶
RDD.
sum
(
)
[source]
¶
Add up the elements in this RDD.
Examples
>>>
sc
.
parallelize
([
1.0
,
2.0
,
3.0
])
.
sum
()
6.0
pyspark.RDD.subtractByKey
pyspark.RDD.sumApprox