I am having some difficulty mapping a function to rows of a dataframe and then convert this back to a new dataframe.
So far I have
val intrdd = df.rdd.map(row => processRow(row))
val processeddf = intrdd.toDF
However this does not work as toDF does not work for my RDD[Row] case.
Is there a good way to do this?
Note I am on Spark 2.2.0 so I cannot use SqlContext, only SparkSession.
Thanks.