Contents

sorted(on:order:)

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 name.

Declaration

func sorted(on columnName: String, order: Order = .ascending) -> DataFrame

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

Creating a Data Frame by Sorting a Column