I am getting error while renaming a column, is there anyway i can rename it, as there are space in column name
df=df.withColumnRenamed("std deviation","stdDeviation")
Error:AnalysisException: Attribute name "std deviation" contains invalid character(s) among " ,;{}()\n\t=". Please use alias to rename it.
I tried another way by using alias, but no success.
df=df.select(col("std deviation").alias("stdDeviation"))
is there a way I can rename columns that contain space?
Error:AnalysisException: Attribute name "std deviation" contains invalid character(s) among " ,;{}()\n\t=". Please use alias to rename it.