I have a dataframe and i need to compare the value of a column. The value of the column should be greater than 2 but less than 6 How should i achieve that
df.withColumn('coln',(min(max(df["cola"],2),6)))
This doesn't work
I have a dataframe and i need to compare the value of a column. The value of the column should be greater than 2 but less than 6 How should i achieve that
df.withColumn('coln',(min(max(df["cola"],2),6)))
This doesn't work