Contents

sort(on:_:by:)

Arranges the rows of a data frame according to a column that you select by its name and type, with a predicate.

Declaration

mutating func sort<T>(on columnName: String, _ type: T.Type, by areInIncreasingOrder: (T, T) throws -> Bool) rethrows

Parameters

  • columnName:

    The name of a column.

  • type:

    The column’s type.

  • areInIncreasingOrder:

    A closure that returns a Boolean that indicates whether the two elements are in increasing order.

Discussion

See Also

Sorting a Data Frame