I have below dataframe and i need to convert empty arrays to null.
+----+---------+-----------+ | id|count(AS)|count(asdr)| +----+---------+-----------+ |11
you can do it with selectExpr:
selectExpr
df_filled = df.selectExpr( "id", "if(size(column1)<=0, null, column1)", "if(size(column2)<=0, null, column2)", ... )