Filter

Constructs and returns a series which only contains the values of the

source
parameter series for which the
condition
parameter was
true

Accepts the following parameters:

Parameter NameTypeDefault ValueNotes
sourceSeries<Any>--
conditionBoolean--

Returns: Series<Any>

Filter is a built-in function - you can use it directly. Below is an example implementation:

123
function Filter(source, condition):
series filtered:
if condition: source