QuestionQ205

VerifiedUsing Spark SQL

Which code block returns a DataFrame ordered ascending by the sqft column, with missing values appearing first?

Explanation

Column.asc_nulls_first() creates an ascending sort expression that places null values before non-null values. Therefore, applying asc_nulls_first() to the sqft column and supplying that expression to orderBy produces the required ordering.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!