;))
val dt = dataRDD.*zipWithUniqueId*.map(_.swap)
val newCol1 = *dt*.map {case (i, x) => (i, x(1)+x(18)) }
val newCol2 = newCol1.join(dt).map(x=> function(.))
Hope this helps.
--
View this message in context:
http://apache-spark-user-list.1001560.n3.nabble.com/Column-operation-on-Spark-RDDs-tp
,"))
> val dt = dataRDD.zipWithIndex.map(_.swap)
> val newCol1 = dataRDD.map(x => x(1)+x(18)).zipWithIndex.map(_.swap)
> val newCol2 = newCol1.join(dt).map(x=> function(.))
>
> Is there a better way of doing this?
>
> Thank you very much!
>
>
>
>
>
abble.com/Column-operation-on-Spark-RDDs-tp23165.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org