Spark 2.0 Dataframe : How to change value instead of map then get/getString/getInt -
i have dataframe in apache spark, has lot of columns. want manipulate data using map function using following code :
df.map(x=>{ val x1= x.getstring(0) val x2= x.getstring(1) ... val xn=x.getstring(n) (x1,x2,...,xn) }).todf("x1","x2",...,"xn") are there others alternatives better ?
Comments
Post a Comment