I want to get all values of a column in pyspark dataframe. I did some search, but I never find a efficient and short solution.
Assuming I want to get a values in the column called "name". I have a solution:
sum(dataframe.select("name").toPandas().values.tolist(),[])
It works, but it is not efficient since it converts to pandas then flatten the list... Is there a better and short solution?