smultiple ort the columns in pandas code example
Example 1: dataframe sort by column
sorted = df.sort_values('column-to-sort-on', ascending=False)
df.sort_values('name', inplace=True)
Example 2: Returns a new DataFrame sorted by the specified column(s)
df.sort(df.age.desc()).collect()
df.sort("age", ascending=False).collect()
df.orderBy(df.age.desc()).collect()
from pyspark.sql.functions import *
df.sort(asc("age")).collect()
df.orderBy(desc("age"), "name").collect()
df.orderBy(["age", "name"], ascending=[0, 1]).collect()