List Element
Select a numbered element of a list (zero indexed).
Parameters
| Name | Description | Accepted Values | Default | Required |
|---|---|---|---|---|
| I/O | ||||
input | Name of the input column. | string, integer, array | — | Yes |
output | Name of the output column. | string, array, null | null | No |
| Options | ||||
element | The numbered element of the list to select. Starts from zero. This may use python slicing syntax to select a subset of the list. | integer | 0 | 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 |
| Errors | ||||
default | Set the default value to return if the specified element doesn't exist. | string, number, array, object, boolean, null | "" | No |
Examples
wrangles:
- select.list_element:
input: Col1
output: Second Element
element: 2 # Zero indexed
default: F
| Col1 |
|---|
| ['A', 'B', 'C'] |
| ['D', 'E'] |
| Third Element |
|---|
| C |
| F |
Access
| Requirement | Value |
|---|---|
| AI-powered | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Technical details
| Field | Value |
|---|---|
| Catalog ID | 57 |
| Catalog key | select.list_element |
| Recipe key | select.list_element |
| Catalog status | active |
| Lifecycle status | active |
| Recipe Writer eligible | Yes |
| Namespace | select |
| Documentation group | select |
| Aliases | None |
| Runtime symbol | wrangles.recipe_wrangles.select.list_element |
| Legacy UUID | ec40495d-d29a-4f62-86dd-eafa43cf388a |
Sources