From 3cddfaf58c69acc624dac16df10357a78ececf59 Mon Sep 17 00:00:00 2001 From: Tom Stepp Date: Mon, 23 May 2022 03:18:29 -0700 Subject: [PATCH] Add clarification on Filter transform's input function to pydoc. (#17704) --- sdks/python/apache_beam/transforms/core.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sdks/python/apache_beam/transforms/core.py b/sdks/python/apache_beam/transforms/core.py index 3fda87ebfcfc..b544c03c7442 100644 --- a/sdks/python/apache_beam/transforms/core.py +++ b/sdks/python/apache_beam/transforms/core.py @@ -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.