ezoic

Monday, April 10, 2017

Spark scala, change the data type of the RDD

code:

val aa=sc.parallelize(List(("Ale",12,2783,89277)))

val ak = aa.map ( {case(w,k,r,u)=>(w,k,r,u.toLong)})

print(ak.toDF.show())


Change the last integer's type to Long.

No comments:

Post a Comment

R is not a simple programming language, and it does better on reading excel files than python

R is not a simple programming language, and it does better on reading excel files than python . tried to read excel files to python and R. i...