Skip to main content

Filter

Filter the dataframe based on the contents. If multiple filters are specified, all must be correct. For complex filters, use the where parameter.

Filter the dataframe based on the contents.

Parameters​

NameDescriptionAccepted ValuesDefaultRequired
I/O
inputName of the column to filter on. If multiple are provided, all must match the criteria.string, integer, array[]No
Options
equalSelect rows where the values equal a given value.string, array, nullnullNo
not_equalSelect rows where the values do not equal a given value.string, array, nullnullNo
is_inSelect rows where the values are in a given list.string, array, nullnullNo
not_inSelect rows where the values are not in a given list.string, array, nullnullNo
greater_thanSelect rows where the values are greater than a specified value. Does include the value itself.integer, number, nullnullNo
greater_than_equal_toSelect rows where the values are greater than a specified value. Does include the value itself.integer, number, nullnullNo
less_thanSelect rows where the values are less than a specified value. Does not include the value itself.integer, number, nullnullNo
less_than_equal_toSelect rows where the values are less than a specified value. Does include the value itself.integer, number, nullnullNo
betweenValue or list of values to filter that are in between two parameter values.array, nullnullNo
containsSelect rows where the input contains the value. Allows regular expressions.string, nullnullNo
not_containsSelect rows where the input does not contain the value. Allows regular expressions.string, nullnullNo
is_nullIf true, select all rows where the value is NULL. If false, where is not NULL.boolean, nullnullNo
Conditions
ifCondition that determines whether the wrangle runs as a whole. Recipe variables may be referenced with ${variable}.string—No
whereFilter rows before applying the wrangle using SQL-like criteria, such as column1 = 123 OR column2 = 'abc'.string—No
where_paramsValues used with where for parameterized criteria. Uses SQLite placeholder syntax such as ? or :name.array, object—No

Examples​

wrangles:
# Select only red fruits
- filter:
input: Color
equal:
- red
ColorFruit
redApple
greenApple
orangeOrange
redStrawberry
ColorFruit
redApple
redStrawberry
Access
RequirementValue
AI-poweredNo
Requires WrangleWorks accountNo
Requires subscriptionNo
Requires external API keyNo
Technical details
FieldValue
Catalog ID78
Catalog keyfilter
Recipe keyfilter
Catalog statusactive
Lifecycle statusactive
Recipe Writer eligibleYes
NamespaceRoot-level
Documentation groupselect
AliasesNone
Runtime symbolwrangles.recipe_wrangles.main.filter
Legacy UUIDe3242acf-d204-433f-8373-205b77481131

Sources