Lambda with if elif else

Viewed 39

I try to put more than 2 conditions in my lambda.

df['AA'] = df['AA'].apply(lambda x : "Suppression" if x==1 or x==61 else "Check") I want to add more conditions like elif x==90 "Dont Suppress" elif x==93 "..." then my else "check". Is it possible with a lambda? I must have a syntax issue. Thanks for the help.

0 Answers
Related