I have a dataframe as below where ev is of type string.
>>> df2.show()
+---+--------------+
| id| ev|
+---+--------------+
| 1| 200, 201, 202|
| 1|23, 24, 34, 45|
| 1| null|
| 2| 32|
| 2| null|
+---+--------------+
Is there a way to cast ev to type ArrayType without using UDF or UDF is the only option to do that?