I load the data into data frames where one of the columns is zipCode
(String type).
I wonder how to get non-null values for that column in ascending order in Scala? Many thanks in advance.
scala> val df = Seq("2", "1", null).toDF("x")
df: org.apache.spark.sql.DataFrame = [x: string]
scala> df.orderBy($"x".asc_nulls_last).show
+----+
| x|
+----+
| 1|
| 2|
|null|
+----+