Question : Applies a function to all elements of this RDD.
Answered by : abdoulaye
def f(x): print(x)
sc.parallelize([1, 2, 3, 4, 5]).foreach(f)
Source : http://spark.apache.org/docs/2.1.0/api/python/pyspark.html | Last Update : Wed, 18 Mar 20
Answered by : abdoulaye
def f(x): print(x)
sc.parallelize([1, 2, 3, 4, 5]).foreach(f)
Source : http://spark.apache.org/docs/2.1.0/api/python/pyspark.html | Last Update : Wed, 18 Mar 20