Skip to content

Commit

Permalink
Add clarification on Filter transform's input function to pydoc.
Browse files Browse the repository at this point in the history
It was difficult to understand how to implement a function to pass to the Filter transform. I added a useful comment that was found in "https://beam.apache.org/documentation/transforms/python/elementwise/filter/".
  • Loading branch information
tomstepp committed May 18, 2022
1 parent 6774b74 commit 63ce79d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sdks/python/apache_beam/transforms/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2087,6 +2087,9 @@ def Filter(fn, *args, **kwargs): # pylint: disable=invalid-name
""":func:`Filter` is a :func:`FlatMap` with its callable filtering out
elements.
Filter accepts a function that keeps elements that return True, and filters
out the remaining elements.
Args:
fn (``Callable[..., bool]``): a callable object. First argument will be an
element.
Expand Down

0 comments on commit 63ce79d

Please sign in to comment.