Wrangles that alter the data as a whole, leave data unchanged, or perform actions seen externally.
Accordion
Apply a series of wrangles to the individual elements of one or more lists.
Examples
Apply Convert Case to List Elements
This example applies convert.case to each string in a list, where the wrangle would not normally operate on the list as a whole.
Recipe
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"] |
Output Sample
| list_column | modified_lists |
|---|
| ["a", "b", "c"] | ["A", "B", "C"] |
| ["e", "f", "g"] | ["E", "F", "G"] |
Parameters
| Parameter | Label | UI Type | Required | Description | Allowed Values | Default |
|---|
| input | Input | list | Yes | Column or columns containing the lists whose elements will be processed. Multiple list columns must contain matching element counts. | | |
| output | Output | list | Yes | Columns returned to the dataframe. Columns created inside the accordion are dropped unless listed here. | | |
| wrangles | Wrangles | json | Yes | Wrangles to apply to each list element. | | |
| propagate | Propagate | list | No | Limit the columns available to the nested wrangles and replicated for each element. All columns are propagated when omitted. | | |
| where | Where | text | No | Filter rows before applying the wrangle using SQL-style criteria. | | |
| where_params | Where Params | json | No | Values used to parameterize where with SQLite syntax such as ? or :name. | | |
| if | If | text | No | Condition that determines whether the action runs as a whole. | | |
Defaults
No defaults are documented in the legacy source.
Access
| Requirement | Value |
|---|
| AI-backed | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Source
Metadata
| Field | Value |
|---|
| ID | Not available in generated catalog |
| Wrangle Key | accordion |
| Type | utility |
| Subtype | |
| Variant | stock |
| Status | active (legacy documentation) |
| Tags | Utility, accordion |
Batch
Execute a series of wrangles in batches. Batches can run in parallel with threads and can provide fallback output when an error occurs.
Examples
This example processes product descriptions in batches of two rows.
Recipe
wrangles:
- batch:
batch_size: 2
threads: 1
wrangles:
- extract.ai:
api_key: Your OpenAI API key
input: Product Description
output:
Title:
type: string
description: Title of the product
| Product Description |
|---|
| Sleep better with our Memory Foam Pillow, designed to contour to your head and neck. |
| Stay comfortable and stylish with our Organic Cotton T-Shirt, made from soft, breathable fabric. |
| Keep drinks hot or cold with our Stainless Steel Water Bottle, featuring durable insulation. |
| Enjoy crisp sound and long battery life with our Wireless Bluetooth Earbuds. |
Output Sample
| Product Description | Title |
|---|
| Sleep better with our Memory Foam Pillow, designed to contour to your head and neck. | Memory Foam Pillow |
| Stay comfortable and stylish with our Organic Cotton T-Shirt, made from soft, breathable fabric. | Organic Cotton T-Shirt |
| Keep drinks hot or cold with our Stainless Steel Water Bottle, featuring durable insulation. | Stainless Steel Water Bottle |
| Enjoy crisp sound and long battery life with our Wireless Bluetooth Earbuds. | Wireless Bluetooth Earbuds |
Parameters
| Parameter | Label | UI Type | Required | Description | Allowed Values | Default |
|---|
| batch_size | Batch Size | number | Yes | Number of rows in each batch. | | |
| wrangles | Wrangles | json | Yes | Wrangles to apply to each batch as a nested recipe. | | |
| threads | Threads | number | No | Number of batches to run in parallel. | | |
| on_error | On Error | json | No | Default output to use when an error occurs within a batch. | | |
| if | If | text | No | Condition that determines whether the action runs as a whole. | | |
Defaults
No defaults are documented in the legacy source.
Access
| Requirement | Value |
|---|
| AI-backed | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Nested wrangles can have their own access or API-key requirements. The example uses extract.ai, which requires an API key.
Source
Metadata
| Field | Value |
|---|
| ID | Not available in generated catalog |
| Wrangle Key | batch |
| Type | utility |
| Subtype | |
| Variant | stock |
| Status | active (legacy documentation) |
| Tags | Utility, batch |
Concurrent
Run multiple wrangles concurrently instead of sequentially. Concurrent wrangles must declare output columns, may finish in any order, and should not update overlapping columns.
See the Concurrent connector for the connector equivalent.
Examples
Recipe
wrangles:
- concurrent:
wrangles:
- extract.codes:
input: Products
output: Part Codes
- extract.attributes:
input: Products
output: Attributes
| Products |
|---|
| SKF ball brg 2" od 6202 |
| brg seal 1" id 5493 |
| 3lb hammer 87102 |
Output Sample
| Products | Part Codes | Attributes |
|---|
| SKF ball brg 2" od 6202 | 6202 | {"length":["2in"]} |
| brg seal 1" id 5493 | 5493 | {"length":["1in"]} |
| 3lb hammer 87102 | 87102 | {"weight":["3lb"]} |
Parameters
| Parameter | Label | UI Type | Required | Description | Allowed Values | Default |
|---|
| wrangles | Wrangles | json | Yes | Wrangles to execute concurrently. | | |
| max_concurrency | Max Concurrency | number | No | Maximum number of wrangles to execute in parallel. | | |
Defaults
No defaults are documented in the legacy source.
Access
| Requirement | Value |
|---|
| AI-backed | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Nested wrangles can have their own access requirements.
Source
Metadata
| Field | Value |
|---|
| ID | Not available in generated catalog |
| Wrangle Key | concurrent |
| Type | utility |
| Subtype | |
| Variant | stock |
| Status | active (legacy documentation) |
| Tags | Utility, concurrent |
Copy
Create a copy of columns in a dataframe.
Examples
Recipe
wrangles:
- copy:
input: Product Data
output: Product Data (copy)
| Product Data |
|---|
| SKF ball brg |
| brg seal |
Output Sample
| Product Data | Product Data (copy) |
|---|
| SKF ball bearing | SKF ball bearing |
| bearing seal | bearing seal |
Copying a Column Express as a Dictionary
Recipe
wrangles:
- copy:
Product Data: Product Data (copy)
| Product Data |
|---|
| SKF ball brg |
| brg seal |
Output Sample
| Product Data | Product Data (copy) |
|---|
| SKF ball bearing | SKF ball bearing |
| bearing seal | bearing seal |
Parameters
| Parameter | Label | UI Type | Required | Description | Allowed Values | Default |
|---|
| input | Input | list | Yes | The column(s) to copy. | | ["Column A", "Column B"] |
| output | Output | list | Yes | The name of the output column(s). | | ["Copy Output"] |
| where | Where | text | No | Filter the data to only apply the wrangle to certain rows using SQL-style criteria, such as column1 = 123 OR column2 = 'abc'. | | |
| where_params | Where Params | json | No | Variables to use with where so the query can be parameterized. Uses SQLite syntax (? or :name). | | |
| if | If | text | No | A condition that determines whether the action runs as a whole. | | |
Defaults
{
"input": [
"Column A",
"Column B"
],
"output": [
"Copy Output"
]
}
Access
| Requirement | Value |
|---|
| AI-backed | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Source
| Field | Value |
|---|
| Docs Path | docs/python/recipes/wrangles/utilities.md |
| Docs URL | https://wrangles.io/python/recipes/wrangles/utilities |
| Legacy Path | docs/python/recipes/wrangles/utilities.md |
| Catalog Source | my-docs-site/src/components/WrangleFlowPlayground/wrangleCatalog.generated.js |
| Mapping Source | my-docs-site/src/components/WrangleFlowPlayground/wrangleMappings.json |
Metadata
| Field | Value |
|---|
| ID | b002fbdc-92c0-4347-889d-0f4bfeec99fa |
| Wrangle Key | copy |
| Type | transform |
| Subtype | |
| Variant | stock |
| Status | active |
| Tags | Transform, copy |
Drop
Drop (Delete) selected column(s)
Examples
Dropping a Column
Recipe
wrangles:
- drop:
columns:
- Material
| Material | Product Data |
|---|
| Ceramic | SKF ball brg |
| Rubber | brg seal |
Output Sample
| Product Data |
|---|
| SKF ball bearing |
| bearing seal |
Parameters
| Parameter | Label | UI Type | Required | Description | Allowed Values | Default |
|---|
| columns | Columns | list | Yes | Name of the column(s) to drop | | ["Column A", "Column B"] |
| if | If | text | No | A condition that determines whether the action runs as a whole. | | |
Defaults
{
"columns": [
"Column A",
"Column B"
]
}
Access
| Requirement | Value |
|---|
| AI-backed | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Source
| Field | Value |
|---|
| Docs Path | docs/python/recipes/wrangles/utilities.md |
| Docs URL | https://wrangles.io/python/recipes/wrangles/utilities |
| Legacy Path | docs/python/recipes/wrangles/utilities.md |
| Catalog Source | my-docs-site/src/components/WrangleFlowPlayground/wrangleCatalog.generated.js |
| Mapping Source | my-docs-site/src/components/WrangleFlowPlayground/wrangleMappings.json |
Metadata
| Field | Value |
|---|
| ID | 363bffbf-397e-4975-8382-e9efa5e9eed6 |
| Wrangle Key | drop |
| Type | select |
| Subtype | |
| Variant | stock |
| Status | active |
| Tags | Select, drop |
Explode
Explode a column of lists into rows
Examples
Exploding a Column
Recipe
wrangles:
- explode:
input: Products
| Products | Manufacturer |
|---|
| [Ball Bearing, Bearing Seal] | SKF |
| [Angle Grinder, Drill, Impact Driver] | Milwaukee |
| Solid State Relay | Schneider |
Output Sample
| Products | Manufacturer |
|---|
| Ball Bearing | SKF |
| Bearing Seal | SKF |
| Angle Grinder | Milwaukee |
| Drill | Milwaukee |
| Impact Driver | Milwaukee |
| Solid State Relay | Schneider |
Parameters
| Parameter | Label | UI Type | Required | Description | Allowed Values | Default |
|---|
| input | Input | list | Yes | Name of the column(s) to explode. If multiple columns are included, they must contain lists of the same length. | | ["Column A", "Column B"] |
| drop_empty | Drop Empty | boolean | No | Empty lists will not produce a row in the exploded output. Default false. | | false |
| reset_index | Reset Index | boolean | No | Reset the index after exploding. Default false. | | false |
| if | If | text | No | A condition that determines whether the action runs as a whole. | | |
Defaults
{
"input": [
"Column A",
"Column B"
],
"drop_empty": false,
"reset_index": false
}
Access
| Requirement | Value |
|---|
| AI-backed | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Source
| Field | Value |
|---|
| Docs Path | docs/python/recipes/wrangles/utilities.md |
| Docs URL | https://wrangles.io/python/recipes/wrangles/utilities |
| Legacy Path | docs/python/recipes/wrangles/utilities.md |
| Catalog Source | my-docs-site/src/components/WrangleFlowPlayground/wrangleCatalog.generated.js |
| Mapping Source | my-docs-site/src/components/WrangleFlowPlayground/wrangleMappings.json |
Metadata
| Field | Value |
|---|
| ID | 4e4b13ac-8d50-4b2c-85c8-2c31de1e817d |
| Wrangle Key | explode |
| Type | split |
| Subtype | |
| Variant | stock |
| Status | active |
| Tags | Split, explode |
Filter
Filter the dataframe based on the contents.
Examples
Filtering a Column
Recipe
wrangles:
- filter:
input: Color
equal:
- red
| Color | Fruit |
|---|
| red | Apple |
| green | Apple |
| orange | Orange |
| red | Strawberry |
Output Sample
| Color | Fruit |
|---|
| red | Apple |
| red | Strawberry |
Parameters
| Parameter | Label | UI Type | Required | Description | Allowed Values | Default |
|---|
| input | Input | list | No | Name of the column to filter on. | | ["Column A", "Column B"] |
| between | Between | list | No | Value or list of values to filter that are in between two parameter values | | [] |
| contains | Contains | text | No | Select rows where the input contains the value. Allows regular expressions. | | "" |
| equal | Equal | boolean | No | Select rows where the values equal a given value. | | false |
| greater_than | Greater Than | number | No | Select rows where the values are greater than a specified value. Does include the value itself. | | "" |
| greater_than_equal_to | Greater Than Equal To | number | No | Select rows where the values are greater than a specified value. Does include the value itself. | | "" |
| is_in | Is In | list | No | Select rows where the values are in a given list. | | [] |
| is_null | Is Null | boolean | No | If true, select all rows where the value is NULL. If false, where is not NULL. | | false |
| less_than | Less Than | number | No | Select rows where the values are less than a specified value. Does not include the value itself. | | "" |
| less_than_equal_to | Less Than Equal To | number | No | Select rows where the values are less than a specified value. Does include the value itself. | | "" |
| not_contains | Not Contains | text | No | Select rows where the input does not contain the value. Allows regular expressions. | | "" |
| not_equal | Not Equal | boolean | No | Select rows where the values do not equal a given value. | | false |
| not_in | Not In | list | No | Select rows where the values are not in a given list. | | [] |
| where | Where | text | No | Use a SQL WHERE clause to filter the data. input must be used if where is not provided. Prefer using where independently of all other parameters except where_params. | | "" |
| where_params | Where Params | json | No | Variables to use with where so the query can be parameterized. Uses SQLite syntax (? or :name). | | [] |
| if | If | text | No | A condition that determines whether the action runs as a whole. | | |
Defaults
{
"equal": false,
"input": [
"Column A",
"Column B"
],
"is_in": [],
"not_in": [],
"between": [],
"is_null": false,
"contains": "",
"less_than": "",
"not_equal": false,
"greater_than": "",
"not_contains": "",
"less_than_equal_to": "",
"greater_than_equal_to": ""
}
Access
| Requirement | Value |
|---|
| AI-backed | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Source
| Field | Value |
|---|
| Docs Path | docs/python/recipes/wrangles/utilities.md |
| Docs URL | https://wrangles.io/python/recipes/wrangles/utilities |
| Legacy Path | docs/python/recipes/wrangles/utilities.md |
| Catalog Source | my-docs-site/src/components/WrangleFlowPlayground/wrangleCatalog.generated.js |
| Mapping Source | my-docs-site/src/components/WrangleFlowPlayground/wrangleMappings.json |
Metadata
| Field | Value |
|---|
| ID | e3242acf-d204-433f-8373-205b77481131 |
| Wrangle Key | filter |
| Type | select |
| Subtype | |
| Variant | stock |
| Status | active |
| Tags | Select, filter |
Log
Print the current status of the dataframe. Only a sample of rows is logged.
Examples
Logging All Columns to Terminal
Recipe
Logging side-effect; no tabular input sample.
Output Sample
Logs a sample of rows or status information to the configured destination.
Logging Specific Columns to Terminal
Recipe
wrangles:
- log:
columns:
- column1
- column2
Logging side-effect; no tabular input sample.
Output Sample
Logs a sample of rows or status information to the configured destination.
Logging to a File
Recipe
wrangles:
- log:
write:
- file:
name: output/filepath
columns:
- column 1
- column 2
Logging side-effect; no tabular input sample.
Output Sample
Logs a sample of rows or status information to the configured destination.
Native Variables
| Variable | Function |
|---|
${column_count} | Number of columns. |
${columns} | List of all columns. |
${df} | Current dataframe. |
${row_count} | Number of visible rows processed in each batch. |
Parameters
| Parameter | Label | UI Type | Required | Description | Allowed Values | Default |
|---|
| columns | Columns | list | No | List of specific columns to log. Defaults to all columns. | | ["Column A", "Column B"] |
| write | Write | list | No | Allows an intermediate output to a file, dataframe, database, etc. | | [] |
| error | Error | text | No | Log an error to the console. | | "" |
| warning | Warning | text | No | Log a warning to the console. | | "" |
| info | Info | text | No | Log info to the console. | | "" |
| log_data | Log Data | boolean | No | Whether to log a sample of the dataframe contents. Default true. | | false |
| where | Where | text | No | Filter the data to only apply the wrangle to certain rows using SQL-style criteria, such as column1 = 123 OR column2 = 'abc'. | | |
| where_params | Where Params | json | No | Variables to use with where so the query can be parameterized. Uses SQLite syntax (? or :name). | | |
| if | If | text | No | A condition that determines whether the action runs as a whole. | | |
Defaults
{
"info": "",
"error": "",
"write": [],
"columns": [
"Column A",
"Column B"
],
"warning": "",
"log_data": false
}
Access
| Requirement | Value |
|---|
| AI-backed | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Source
| Field | Value |
|---|
| Docs Path | docs/python/recipes/wrangles/utilities.md |
| Docs URL | https://wrangles.io/python/recipes/wrangles/utilities |
| Legacy Path | docs/python/recipes/wrangles/utilities.md |
| Catalog Source | my-docs-site/src/components/WrangleFlowPlayground/wrangleCatalog.generated.js |
| Mapping Source | my-docs-site/src/components/WrangleFlowPlayground/wrangleMappings.json |
Metadata
| Field | Value |
|---|
| ID | 6177808e-aa2d-4d0b-8385-858b16948a5d |
| Wrangle Key | log |
| Type | utility |
| Subtype | |
| Variant | stock |
| Status | active |
| Tags | Utility, log |
Matrix
Apply a matrix of wrangles to the dataframe. Each wrangle runs for the configured combinations of variables, including recipe variables and variables declared by the variables parameter.
See the Matrix connector for the connector equivalent.
Examples
Use Hardcoded Variables
Run a custom function once for each configured variable value.
Recipe
wrangles:
- matrix:
variables:
var: [A, B, C]
wrangles:
- custom.test_fn:
input: Part Code
output: Part Code ${var}
value: ${var}
def test_fn(part_code, value):
return part_code + value
| Part Code |
|---|
| 6202 |
| br549 |
| 554-114 |
| 554-112 |
Output Sample
| Part Code | Part Code A | Part Code B | Part Code C |
|---|
| 6202 | 6202A | 6202B | 6202C |
| br549 | br549A | br549B | br549C |
| 554-114 | 554-114A | 554-114B | 554-114C |
| 554-112 | 554-112A | 554-112B | 554-112C |
Use Unique Variables Per Row
This example runs extract.custom once for each unique model ID.
Recipe
wrangles:
- matrix:
variables:
model_id: set(Model ID)
wrangles:
- extract.custom:
input: Description
output: Extracted Values
model_id: ${model_id}
where: "[Model ID] = ?"
where_params:
- ${model_id}
| Description | Model ID |
|---|
| The SKF 6202 bearing is the best bearing in the world | xxxxxxxx-xxxx-xxxx |
| The Timken 6102 bearing is indestructible | yyyyyyyy-yyyy-yyyy |
| The Milwaukee impact has 1200ft-lbs of torque | zzzzzzzz-zzzz-zzzz |
Output Sample
| Description | Model ID | Extracted Values |
|---|
| The SKF 6202 bearing is the best bearing in the world | xxxxxxxx-xxxx-xxxx | 6202 |
| The Timken 6102 bearing is indestructible | yyyyyyyy-yyyy-yyyy | indestructible |
| The Milwaukee impact has 1200ft-lbs of torque | zzzzzzzz-zzzz-zzzz | 1200ft-lbs |
Native Variables
| Variable | Function |
|---|
${column_count} | Number of columns. |
${columns} | List of all columns. |
${df} | Current dataframe. |
${row_count} | Number of visible rows processed in each batch. |
Parameters
| Parameter | Label | UI Type | Required | Description | Allowed Values | Default |
|---|
| variables | Variables | json | Yes | Variable names and the values passed to nested wrangles. | | |
| wrangles | Wrangles | json | Yes | Wrangles to run for each variable combination. | | |
| functions | Functions | json | No | User-defined custom functions available to nested wrangles. | | |
| strategy | Strategy | select | No | How multiple variables are combined. loop repeats shorter lists until the longest completes; permutations uses every combination. | loop, permutations | loop |
| if | If | text | No | Condition that determines whether the action runs as a whole. | | |
Defaults
Access
| Requirement | Value |
|---|
| AI-backed | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Nested wrangles can have their own access requirements.
Source
Metadata
| Field | Value |
|---|
| ID | Not available in generated catalog |
| Wrangle Key | matrix |
| Type | utility |
| Subtype | |
| Variant | stock |
| Status | active (legacy documentation) |
| Tags | Utility, matrix |
Reindex
Conform a DataFrame to a new index with optional filling logic.
Examples
Cannot specify both axis and any of index or columns. Reindex is not compatible with where filtering.
Reindexing a Dataframe
Recipe
wrangles:
- reindex:
index:
- 5
- 4
- 3
- 2
- 1
| Material | Product Data |
|---|
| 1 | Ceramic | SKF ball brg |
| 2 | Rubber | brg seal |
| 3 | Brass | Ball valve |
| 4 | Ceramic | Ceramic cartridge |
| 5 | Stainless Steel | Needle Bearing |
Output Sample
| Material | Product Data |
|---|
| 5 | Stainless Steel | Needle Bearing |
| 4 | Ceramic | Ceramic cartridge |
| 3 | Brass | Ball valve |
| 2 | Rubber | brg seal |
| 1 | Ceramic | SKF ball brg |
Parameters
| Parameter | Label | UI Type | Required | Description | Allowed Values | Default |
|---|
| columns | Columns | list | No | New labels for the columns. Preferably an Index object to avoid duplicating data. | | ["Column A", "Column B"] |
| axis | Axis | text | No | Axis to target. Can be either the axis name (‘index’, ‘columns’) or number (0, 1). | | "" |
| index | Index | list | No | New labels for the index. Preferably an Index object to avoid duplicating data. | | [] |
| labels | Labels | list | No | New labels / index to conform the axis specified by axis. | | [] |
| if | If | text | No | A condition that determines whether the action runs as a whole. | | |
Defaults
{
"axis": "",
"index": [],
"labels": [],
"columns": [
"Column A",
"Column B"
]
}
Access
| Requirement | Value |
|---|
| AI-backed | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Source
| Field | Value |
|---|
| Docs Path | docs/python/recipes/wrangles/utilities.md |
| Docs URL | https://wrangles.io/python/recipes/wrangles/utilities |
| Legacy Path | docs/python/recipes/wrangles/utilities.md |
| Catalog Source | my-docs-site/src/components/WrangleFlowPlayground/wrangleCatalog.generated.js |
| Mapping Source | my-docs-site/src/components/WrangleFlowPlayground/wrangleMappings.json |
Metadata
| Field | Value |
|---|
| ID | def87df8-72da-4e34-83c1-1fde25126257 |
| Wrangle Key | reindex |
| Type | transform |
| Subtype | |
| Variant | stock |
| Status | active |
| Tags | Transform, reindex |
Rename
Rename a column or list of columns.
Examples
Rename is not compatible with where filtering.
Recipe
wrangles:
- rename:
input:
- Manufacturer Name
- Manufacturer Part Number
output:
- Manufacturer
- MPN
| Manufacturer Name | Manufacturer Part Number |
|---|
| SKF | 302-2 |
| Timken | PF48 |
Output Sample
| Manufacturer | MPN |
|---|
| SKF | 302-2 |
| Timken | PF48 |
Recipe
wrangles:
- rename:
Manufacturer Name: Manufacturer
Manufacturer Part Number: MPN
| Manufacturer Name | Manufacturer Part Number |
|---|
| SKF | 302-2 |
| Timken | PF48 |
Output Sample
| Manufacturer | MPN |
|---|
| SKF | 302-2 |
| Timken | PF48 |
Using Wrangles in Rename
Recipe
wrangles:
- rename:
wrangles:
- convert.case:
input: columns
case: upper
| Manufacturer Name | Manufacturer Part Number |
|---|
| SKF | 302-2 |
| Timken | PF48 |
Output Sample
| MANUFACTURER NAME | MANUFACTURER PART NUMBER |
|---|
| SKF | 302-2 |
| Timken | PF48 |
Parameters
| Parameter | Label | UI Type | Required | Description | Allowed Values | Default |
|---|
| input | Input | list | No | Name or list of input columns. | | ["Column A", "Column B"] |
| output | Output | list | No | Name or list of output columns. | | ["Rename Output"] |
| wrangles | Wrangles | list | No | Use wrangles to transform the column names. The input is named columns and the final result must also include the column named columns. This can only be used instead of the standard rename. | | [] |
| if | If | text | No | A condition that determines whether the action runs as a whole. | | |
Defaults
{
"input": [
"Column A",
"Column B"
],
"output": [
"Rename Output"
],
"wrangles": []
}
Access
| Requirement | Value |
|---|
| AI-backed | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Source
| Field | Value |
|---|
| Docs Path | docs/python/recipes/wrangles/utilities.md |
| Docs URL | https://wrangles.io/python/recipes/wrangles/utilities |
| Legacy Path | docs/python/recipes/wrangles/utilities.md |
| Catalog Source | my-docs-site/src/components/WrangleFlowPlayground/wrangleCatalog.generated.js |
| Mapping Source | my-docs-site/src/components/WrangleFlowPlayground/wrangleMappings.json |
Metadata
| Field | Value |
|---|
| ID | ab06898f-faf7-42e7-8275-5e3034a4d727 |
| Wrangle Key | rename |
| Type | transform |
| Subtype | |
| Variant | stock |
| Status | active |
| Tags | Transform, rename |
Sort
Sort the data
Examples
Replacing Abbreviations
Recipe
wrangles:
- sort:
by: Price
ascending: true
| Item | Price |
|---|
| Hammer | 11.99 |
| Chisel | 4.99 |
| Drill | 29.99 |
| Wrench | 6.99 |
| Saw | 13.99 |
Output Sample
| Item | Price |
|---|
| Chisel | 4.99 |
| Wrench | 6.99 |
| Hammer | 11.99 |
| Saw | 13.99 |
| Drill | 29.99 |
Parameters
| Parameter | Label | UI Type | Required | Description | Allowed Values | Default |
|---|
| by | By | list | Yes | Name or list of the column(s) to sort by | | ["Column A", "Column B"] |
| ascending | Ascending | boolean | No | Sort ascending vs. descending. Specify a list to sort multiple columns in different orders. If this is a list of bools then it must match the length of the by. | | false |
| if | If | text | No | A condition that determines whether the action runs as a whole. | | |
Defaults
{
"by": [
"Column A",
"Column B"
],
"ascending": false
}
Access
| Requirement | Value |
|---|
| AI-backed | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Source
| Field | Value |
|---|
| Docs Path | docs/python/recipes/wrangles/utilities.md |
| Docs URL | https://wrangles.io/python/recipes/wrangles/utilities |
| Legacy Path | docs/python/recipes/wrangles/utilities.md |
| Catalog Source | my-docs-site/src/components/WrangleFlowPlayground/wrangleCatalog.generated.js |
| Mapping Source | my-docs-site/src/components/WrangleFlowPlayground/wrangleMappings.json |
Metadata
| Field | Value |
|---|
| ID | 1dcf06ad-898a-4d83-862c-4774be37a687 |
| Wrangle Key | sort |
| Type | select |
| Subtype | |
| Variant | stock |
| Status | active |
| Tags | Select, sort |
Transpose
Transpose a dataframe.
Examples
Transpose is not compatible with where filtering.
Transposing a Dataframe
Recipe
wrangles:
- transpose:
header_column: Material
| Material | Product Data |
|---|
| Ceramic | SKF ball brg |
| Rubber | brg seal |
Output Sample
| Material | Ceramic | Rubber |
|---|
| Product Data | SKF ball brg | brg seal |
Parameters
| Parameter | Label | UI Type | Required | Description | Allowed Values | Default |
|---|
| header_column | Header Column | text | No | Name or position of the column that will be used as the column headings for the transposed DataFrame. Default 0 (first column). Use header_column = null to not use any column as header. | | "" |
| if | If | text | No | A condition that determines whether the action runs as a whole. | | |
Defaults
Access
| Requirement | Value |
|---|
| AI-backed | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Source
| Field | Value |
|---|
| Docs Path | docs/python/recipes/wrangles/utilities.md |
| Docs URL | https://wrangles.io/python/recipes/wrangles/utilities |
| Legacy Path | docs/python/recipes/wrangles/utilities.md |
| Catalog Source | my-docs-site/src/components/WrangleFlowPlayground/wrangleCatalog.generated.js |
| Mapping Source | my-docs-site/src/components/WrangleFlowPlayground/wrangleMappings.json |
Metadata
| Field | Value |
|---|
| ID | 8716347f-f286-49b2-8a0b-cb73292e7475 |
| Wrangle Key | transpose |
| Type | transform |
| Subtype | |
| Variant | stock |
| Status | active |
| Tags | Transform, transpose |
Try
Run a list of wrangles and catch errors. When except is provided, its wrangles or fallback column values run after an error; otherwise, the error is logged and the recipe continues.
Examples
Use Fallback Wrangles After an Error
Recipe
wrangles:
- try:
wrangles:
- risky_wrangle:
input: column
except:
- backup_wrangle:
input: column
The input dataframe is passed to the primary wrangles.
Output Sample
The primary result is returned on success; the except result is returned after an error.
Parameters
| Parameter | Label | UI Type | Required | Description | Allowed Values | Default |
|---|
| df | Dataframe | json | Yes | Dataframe supplied to the nested wrangles by the recipe runtime. | | |
| wrangles | Wrangles | json | Yes | Primary wrangles to apply. | | |
| except | Except | json | No | Wrangles or column/value fallbacks used after an error. When omitted, the error is logged and execution continues. | | |
| functions | Functions | json | No | User-defined custom functions available to the nested wrangles. | | |
| variables | Variables | json | No | Variables available to the nested wrangles. | | |
| retries | Retries | number | No | Number of times to retry after an error. | | 0 |
| if | If | text | No | Condition that determines whether the action runs as a whole. | | |
Defaults
Access
| Requirement | Value |
|---|
| AI-backed | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Nested wrangles can have their own access requirements.
Source
Metadata
| Field | Value |
|---|
| ID | Not available in generated catalog |
| Wrangle Key | try |
| Type | utility |
| Subtype | |
| Variant | stock |
| Status | active (legacy documentation) |
| Tags | Utility, try |
| Field | Value |
|---|
| Type | utility compatibility page |
| Wrangle Count | 14 |
| Generated Source | public.wranglesio_content plus retained legacy Utilities documentation |
| Section Sources | Shared partials from wrangle-docs/utility, transform, select, and split |