I have a dataset with 5 Million records, I need to replace all the values in column using startsWith()
supplying multiple or and conditions.
This code works for a single condition:
df2.withColumn("Deposits", when(col("Deposits").startsWith("0"),"1.1").otherwise(col("Deposits"))).show()
I need to do this:
df2.withColumn("Deposits", when(col("Deposits").startsWith("0"||"1"),"1.1").otherwise(col("Deposits")))