Sort
Sort the data.
Sort the data
Parameters
| Name | Description | Accepted Values | Default | Required |
|---|---|---|---|---|
| I/O | ||||
by | Name or list of the column(s) to sort by. | string, array | — | Yes |
| Options | ||||
ascending | 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. | boolean, array | — | No |
| Formatting | ||||
ignore_index | Ignore Index value accepted by the runtime. | 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:
- sort:
by: Price
ascending: true
| Item | Price |
|---|---|
| Hammer | 11.99 |
| Chisel | 4.99 |
| Drill | 29.99 |
| Wrench | 6.99 |
| Saw | 13.99 |
| Item | Price |
|---|---|
| Chisel | 4.99 |
| Wrench | 6.99 |
| Hammer | 11.99 |
| Saw | 13.99 |
| Drill | 29.99 |
Access
| Requirement | Value |
|---|---|
| AI-powered | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Technical details
| Field | Value |
|---|---|
| Catalog ID | 93 |
| Catalog key | sort |
| Recipe key | sort |
| Catalog status | active |
| Lifecycle status | active |
| Recipe Writer eligible | Yes |
| Namespace | Root-level |
| Documentation group | select |
| Aliases | None |
| Runtime symbol | wrangles.recipe_wrangles.pandas.sort |
| Legacy UUID | 1dcf06ad-898a-4d83-862c-4774be37a687 |
Sources