I'have a dataframe "df1" which looks like below.
+----------+----------+
| col1 | col2|
+----------+----------+
| 11111111|123456789 |
| 11111111| |
| 11111111|123456789 |
| 11111111| |
+-----+----------+----+
I want to filter datafarme by checking if the col2 is spaces.
My command in scala spark-shell is val df3 = crpsdfs.filter($"GASP_NATID01_CD" != "")
But the resultant dataframe has rows with spaces too
Expected result is :
+----------+----------+
| col1 | col2|
+----------+----------+
| 11111111|123456789 |
| 11111111|123456789 |
+-----+----------+----+
could you please help.