HI all
i have a dataFrame with a column ("Age", type double) and i am trying to
create a new
column based on the value of the Age column, using Scala API
this code keeps on complaining
scala> df.withColumn("AgeInt", if (df("Age") > 29.0) lit(1) else lit(0))
<console>:28: error: type mismatch;
found : org.apache.spark.sql.Column
required: Boolean
df.withColumn("AgeInt", if (df("Age") > 29.0) lit(1) else
lit(0))
any suggestions?
kind regars
marco
