Threshold
Select the first option if it exceeds a given threshold, else the second option.
Parameters
| Name | Description | Accepted Values | Default | Required |
|---|---|---|---|---|
| I/O | ||||
input | List of the input columns to select from. | array | — | Yes |
output | Name of the output column. | string | — | Yes |
| Options | ||||
threshold | Threshold above which to choose the first option, otherwise the second. | number | — | Yes |
| 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.threshold:
input:
- Col1
- Col2
output: Result
threshold: .77
| Col1 | Col2 |
|---|---|
| ['A', 0.6] | ['B', 0.79] |
| Result |
|---|
| B |
Access
| Requirement | Value |
|---|---|
| AI-powered | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Technical details
| Field | Value |
|---|---|
| Catalog ID | 62 |
| Catalog key | select.threshold |
| Recipe key | select.threshold |
| Catalog status | active |
| Lifecycle status | active |
| Recipe Writer eligible | Yes |
| Namespace | select |
| Documentation group | select |
| Aliases | None |
| Runtime symbol | wrangles.recipe_wrangles.select.threshold |
| Legacy UUID | af2a5dcc-0ec0-48d7-8fb4-f58d9c5391d2 |
Sources