sorted(on:by:)
Generates a data frame by copying the data frame’s rows and then sorting the rows according to a column that you select by its column identifier, with a predicate.
Declaration
func sorted<T>(on columnID: ColumnID<T>, by areInIncreasingOrder: (T, T) throws -> Bool) rethrows -> DataFrameParameters
- columnID:
The identifier of a column.
- areInIncreasingOrder:
A closure that returns a Boolean that indicates whether the two elements are in increasing order.