Share via


DataFrame.Sort Method

Definition

Overloads

Sort(String, String[])

Returns a new DataFrame sorted by the specified column, all in ascending order.

Sort(Column[])

Returns a new DataFrame sorted by the given expressions.

Sort(String, String[])

Returns a new DataFrame sorted by the specified column, all in ascending order.

public Microsoft.Spark.Sql.DataFrame Sort (string column, params string[] columns);
member this.Sort : string * string[] -> Microsoft.Spark.Sql.DataFrame
Public Function Sort (column As String, ParamArray columns As String()) As DataFrame

Parameters

column
String

Column name to sort by

columns
String[]

Additional column names to sort by

Returns

DataFrame object

Applies to

Sort(Column[])

Returns a new DataFrame sorted by the given expressions.

public Microsoft.Spark.Sql.DataFrame Sort (params Microsoft.Spark.Sql.Column[] columns);
member this.Sort : Microsoft.Spark.Sql.Column[] -> Microsoft.Spark.Sql.DataFrame
Public Function Sort (ParamArray columns As Column()) As DataFrame

Parameters

columns
Column[]

Column expressions to sort by

Returns

DataFrame object

Applies to