I have a complex code and I am using when
to make a new column under some conditions. Consider the following code:
df.select(
'*',
F.when((A)|(B)|(C),top_val['val']).alias('match'))
let A,B and C are my conditions. I want to put an order on these conditions like this:
If A
satisfied then don't check B
and C
If B satisfied then don't check C
.
Is there any way to put this order?