Usage
The following examples show how the step can be used in a recipe.Examples
Examples
- Example 1
- Example 2
- Signature
E.g., to keep only those rows whose values in the “address” column contain the text string “Madrid”:
Inputs & Outputs
The following are the inputs expected by the step and the outputs it produces. These are generally columns (ds.first_name), datasets (ds or ds[["first_name", "last_name"]]) or models (referenced
by name e.g. "churn-clf").
Inputs
Inputs
dataset
required
An input dataset to filter.
Outputs
Outputs
dataset
required
A dataset containing the same columns as the input dataset, but including or excluding the matched rows.
Configuration
The following parameters can be used to configure the behaviour of the step by including them in a json object as the last “input” to the step, i.e.step(..., {"param": "value", ...}) -> (output).
Parameters
Parameters
string (ds_in.column:text|list)
required
Name of column to be matched against the specified
values.[number, string, array[['number', 'string']]]
required
Values to be matched in each row to decide its inclusion or exclusion.
May be a single value or a list of values to be matched.
Array items
Array items
[number, string]
Each item in array.
Examples
Examples
- the
- [‘the’, ‘cat’]
- 2
- [2, 3]
boolean
default:"false"
If
true, matching rows will be excluded from the output dataset.
I.e., only rows not containing the specified values will be returned.boolean
default:"false"
Rows must contain all specified value to pass filter, rather than any.
boolean
default:"true"
Text values must match case to pass filter.