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
| Name | Description | Accepted Values | Default | Required |
|---|---|---|---|---|
| I/O | ||||
input | Name of the column to filter on. If multiple are provided, all must match the criteria. | string, integer, array | [] | No |
| Options | ||||
equal | Select rows where the values equal a given value. | string, array, null | null | No |
not_equal | Select rows where the values do not equal a given value. | string, array, null | null | No |
is_in | Select rows where the values are in a given list. | string, array, null | null | No |
not_in | Select rows where the values are not in a given list. | string, array, null | null | No |
greater_than | Select rows where the values are greater than a specified value. Does include the value itself. | integer, number, null | null | No |
greater_than_equal_to | Select rows where the values are greater than a specified value. Does include the value itself. | integer, number, null | null | No |
less_than | Select rows where the values are less than a specified value. Does not include the value itself. | integer, number, null | null | No |
less_than_equal_to | Select rows where the values are less than a specified value. Does include the value itself. | integer, number, null | null | No |
between | Value or list of values to filter that are in between two parameter values. | array, null | null | No |
contains | Select rows where the input contains the value. Allows regular expressions. | string, null | null | No |
not_contains | Select rows where the input does not contain the value. Allows regular expressions. | string, null | null | No |
is_null | If true, select all rows where the value is NULL. If false, where is not NULL. | boolean, null | null | No |
| Conditions | ||||
if | Condition that determines whether the wrangle runs as a whole. Recipe variables may be referenced with ${variable}. | string | — | No |
where | Filter rows before applying the wrangle using SQL-like criteria, such as column1 = 123 OR column2 = 'abc'. | string | — | No |
where_params | Values 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
| Color | Fruit |
|---|---|
| red | Apple |
| green | Apple |
| orange | Orange |
| red | Strawberry |
| Color | Fruit |
|---|---|
| red | Apple |
| red | Strawberry |
Access
| Requirement | Value |
|---|---|
| AI-powered | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Technical details
| Field | Value |
|---|---|
| Catalog ID | 78 |
| Catalog key | filter |
| Recipe key | filter |
| Catalog status | active |
| Lifecycle status | active |
| Recipe Writer eligible | Yes |
| Namespace | Root-level |
| Documentation group | select |
| Aliases | None |
| Runtime symbol | wrangles.recipe_wrangles.main.filter |
| Legacy UUID | e3242acf-d204-433f-8373-205b77481131 |
Sources