diff --git a/python/pyspark/rdd.py b/python/pyspark/rdd.py index 15be4bfec92f9..7112d41e6693a 100644 --- a/python/pyspark/rdd.py +++ b/python/pyspark/rdd.py @@ -634,6 +634,11 @@ def processPartition(iterator): def foreachPartition(self, f): """ Applies a function to each partition of this RDD. + + + Note: Due to implementation, f must either return an iterable object + or be a generator function. However, foreachPartition always returns + `None`. >>> def f(iterator): ... for x in iterator: