Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Applies a function to all elements of this RDD.

def f(x): print(x)
sc.parallelize([1, 2, 3, 4, 5]).foreach(f)
Source by spark.apache.org #
 
PREVIOUS NEXT
Tagged: #Applies #function #elements
ADD COMMENT
Topic
Name
2+3 =