I have a working code that I am trying to reduce
df['Criteria'] = (df['Alpha'] == 3) | (df['Alpha'] == 4)
I tried with error the below (TypeError: isin() takes 2 positional arguments but 3 were given)
df['Criteria'] = df['Alpha'].isin(3,4)
I took reference from Pythonic Way to have multiple Or's when conditioning in a dataframe
Can anyone advise me on this please? Thank you