DataBricks: using variable in arrays_zip function
using the following:
array=["col1","col2"]
df.select(arrays_zip(*[c for c in array]]).show()
Thanks
May I know if we can use variable/array in the arrays_zip function ??
For example I declare and array 
array1=["col1","col2"]
then in the dataframe. I write the following :
df.withColumn("zipped",arrays_zip(array1))
then it tells me it's not a valid argument not a string or column
any one has the idea ?