I am getting a dataframe which when printed is as follows. Essentially its Array[String] data types and at times in database we have arrays of nulls.
+----------+
|newAddress|
+----------+
| null|
| null|
| null|
| null|
| null|
| null|
| [,,]|
| [,,]|
| [,,]|
| [,,]|
| null|
| [,,]|
| [,,]|
| [,,]|
| [,,]|
| [,,]|
| [,,]|
| [,,]|
| [,,]|
+----------+
So I want to write a UDF which scans all columns of the dataframe and if the datatype is an array (of any type); then scans through the array and removes the nulls. If this can be generically built without requiring taking the column names etc -- it will be great
any thoughts?