Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions python/pyspark/rdd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down