我从:
返回了MapPartitionsRDDfrom pyspark.mllib.feature import Normalizer
normalizer = Normalizer()
rating = normalizer.transform(ratingRDD)
print(rating)
> MapPartitionsRDD[239] at mapPartitions at PythonMLLibAPI.scala:1522
如何将其转换为数据框?
答案 0 :(得分:1)
尝试:
rating.map(lambda x: (x, )).toDF()