📜  如何从 rdd 创建数据框 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:04.653000             🧑  作者: Mango

代码示例1
val df=rdd.flatMap(x=>x.split(" ")).map(x=>(x,1)).reduceByKey((x,y)=>(x+y)).toDF("word","count")