DataFrame.sortValues
Sort a Dataframe in ascending or descending order by a specified column name.
danfo.DataFrame.sortValues(by, options) [source]
Parameters | Type | Description | Default |
---|---|---|---|
by | Object | This key can be either a single column name or a single array of the same length as the calling DataFrame. | |
options | Object | Optional configuration: ascending: Order of sorting inplace: Boolean indicating whether to perform the operation inplace or not. Defaults to false | { ascending: true, inplace: false } |
Examples
Sort DataFrame by a column in ascending order
Sort DataFrame by a column in descending order
Last updated