Answers for "how to create dataframe from rdd"

0

how to create dataframe from rdd

val df=rdd.flatMap(x=>x.split(" ")).map(x=>(x,1)).reduceByKey((x,y)=>(x+y)).toDF("word","count")
Posted by: Guest on June-03-2021

Code answers related to "how to create dataframe from rdd"

Browse Popular Code Answers by Language