Explode
Explode a column of lists into rows.
Explode a column of lists into rows
Parameters
| Name | Description | Accepted Values | Default | Required |
|---|---|---|---|---|
| I/O | ||||
input | Name of the column(s) to explode. If multiple columns are included they must contain lists of the same length. | string, integer, array | — | Yes |
| Options | ||||
drop_empty | If true, any rows that contain an empty list will be dropped. If false, rows that contain empty lists will keep 1 row with an empty value. Default False. | boolean | false | No |
| Formatting | ||||
reset_index | Reset the index after exploding. Default True. | boolean | true | 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 |
Examples
wrangles:
- explode:
input: Products
| Products | Manufacturer |
|---|---|
| [Ball Bearing, Bearing Seal] | SKF |
| [Angle Grinder, Drill, Impact Driver] | Milwaukee |
| Solid State Relay | Schneider |
| Products | Manufacturer |
|---|---|
| Ball Bearing | SKF |
| Bearing Seal | SKF |
| Angle Grinder | Milwaukee |
| Drill | Milwaukee |
| Impact Driver | Milwaukee |
| Solid State Relay | Schneider |
Access
| Requirement | Value |
|---|---|
| AI-powered | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Technical details
| Field | Value |
|---|---|
| Catalog ID | 77 |
| Catalog key | explode |
| Recipe key | explode |
| Catalog status | active |
| Lifecycle status | active |
| Recipe Writer eligible | Yes |
| Namespace | Root-level |
| Documentation group | split |
| Aliases | None |
| Runtime symbol | wrangles.recipe_wrangles.pandas.explode |
| Legacy UUID | 4e4b13ac-8d50-4b2c-85c8-2c31de1e817d |
Sources