Accordion
Apply a series of wrangles to column(s) containing lists. The wrangles will be applied to each element in the list and the results will be returned back as a list.
Apply a series of wrangles to the individual elements of one or more lists.
Parameters
| Name | Description | Accepted Values | Default | Required |
|---|---|---|---|---|
| I/O | ||||
input | The column(s) containing the list(s) that the wrangles will be applied to the elements of. | string, integer, array | — | Yes |
output | Output of the wrangles to save back to the dataframe. | string, array, null | null | No |
propagate | Limit the column(s) that will be available to the wrangles and replicated for each element. If not specified, all columns will be propogated. This may be useful to limit the memory use for large datasets. | string, array, 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 |
| Execution | ||||
wrangles | List of wrangles to apply. | array | — | Yes |
Examples
This example applies convert.case to each string in a list, where the wrangle would not normally operate on the list as a whole.
wrangles:
- accordion:
input: list_column
output: modified_lists
wrangles:
- convert.case:
input: list_column
output: modified_lists
case: upper
| list_column |
|---|
| ["a", "b", "c"] |
| ["e", "f", "g"] |
| modified_lists |
|---|
| ["A", "B", "C"] |
| ["E", "F", "G"] |
Access
| Requirement | Value |
|---|---|
| AI-powered | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Technical details
| Field | Value |
|---|---|
| Catalog ID | 69 |
| Catalog key | accordion |
| Recipe key | accordion |
| Catalog status | active |
| Lifecycle status | active |
| Recipe Writer eligible | No |
| Recipe Writer exclusion | Nested-list orchestration is not supported in the baseline. |
| Namespace | Root-level |
| Documentation group | utility |
| Aliases | None |
| Runtime symbol | wrangles.recipe_wrangles.main.accordion |
| Legacy UUID | None |
Sources