Skip to main content

Sort

Sort the data.

Sort the data

Parameters​

NameDescriptionAccepted ValuesDefaultRequired
I/O
byName or list of the column(s) to sort by.string, array—Yes
Options
ascendingSort 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_indexIgnore Index value accepted by the runtime.booleantrueNo
Conditions
ifCondition that determines whether the wrangle runs as a whole. Recipe variables may be referenced with ${variable}.string—No
whereFilter rows before applying the wrangle using SQL-like criteria, such as column1 = 123 OR column2 = 'abc'.string—No
where_paramsValues used with where for parameterized criteria. Uses SQLite placeholder syntax such as ? or :name.array, object—No

Examples​

wrangles:
- sort:
by: Price
ascending: true
ItemPrice
Hammer11.99
Chisel4.99
Drill29.99
Wrench6.99
Saw13.99
ItemPrice
Chisel4.99
Wrench6.99
Hammer11.99
Saw13.99
Drill29.99
Access
RequirementValue
AI-poweredNo
Requires WrangleWorks accountNo
Requires subscriptionNo
Requires external API keyNo
Technical details
FieldValue
Catalog ID93
Catalog keysort
Recipe keysort
Catalog statusactive
Lifecycle statusactive
Recipe Writer eligibleYes
NamespaceRoot-level
Documentation groupselect
AliasesNone
Runtime symbolwrangles.recipe_wrangles.pandas.sort
Legacy UUID1dcf06ad-898a-4d83-862c-4774be37a687

Sources