hi all
 i might be stuck in old code, but this is what i am doing to convert  a DF
int column to Double

val intToDoubleFunc:(Int => Double) = lbl => lbl.toDouble
val labelToDblFunc = udf(intToDoubleFunc)


val convertedDF = df.withColumn("SurvivedDbl",
labelToDblFunc(col("Survived")))

is there a  better way to do that?

kr

Reply via email to