I am trying to convert a pyspark dataframe column from array of string to a string.
df:
text
[this, is, a, book, that, I, like]
I need:
text
"this, is, a, book, that, I, like"
Based on How to convert column of arrays of strings to strings?,
My py3 code:
import pyspark.sql.functions as F
t = df.withColumn('text', F.concat_ws(", ", df.text))
error:
ValueError: too many values to unpack (expected 2)
I missed something ?
thanks