Support Questions
Find answers, ask questions, and share your expertise

withColumn() is not able to add column in dataframe

withColumn() is not able to add column in dataframe

Explorer

i am trying to adding column in my data frame but spark giving me this error :

<console>:42: error: value withColumn is not a member of Unit

 

the way i am doing this is :

val addcol = Cdf.withColumn("Country" , lit("USA"))

thanks in advance