Back
Initially I was unaware that Spark RDD functions cannot be applied on Spark Dataframe. So, I was getting error when I was trying to execute Spark RDD methods on Spark Dataframe.Can anyone tell how can I convert Spark DataFrame to Spark RDD?
To simply convert Spark Dataframe to Spark RDD use .rdd method.
val rows: RDD[row] = df.rdd
I hope this answer would help you!
31k questions
32.8k answers
501 comments
693 users