Command
df.orderBy()Explanation
Order rows in ascending or descending order.
Examples
Sort by salary descending
df.orderBy(df.salary.desc()).show()df.orderBy()Order rows in ascending or descending order.
Sort by salary descending
df.orderBy(df.salary.desc()).show()