Contents

sort(on:order:)

Arranges the rows of a data frame according to a column that you select by its name.

Declaration

mutating func sort(on columnName: String, order: Order = .ascending)

Parameters

  • columnName:

    The name of a column.

  • order:

    A sorting order.

Discussion

This is a convenience method that only works for columns of the following types:

See Also

Sorting a Data Frame