用F.collect_list函數
resdf.groupby('user_id').agg(F.collect_list(F.col("pname")))
用F.collect_list函數
resdf.groupby('user_id').agg(F.collect_list(F.col("pname")))
1. pyspark 版本 2.3.0版本 2. 官網 reduce(f)[source] Reduces the elements of this RDD using the specified