I have a gender column and I only want to drop the ones that are not "MALE" or "FEMALE". How can I use a conditional with 2 variables.
I tried :
train2=train[train.gender = ("FEMALE" | "MALE")]
gives me the error :
SyntaxError: invalid syntax
I could maybe only do one conditional , save it in 2 variables, and then stitch them together again somehow, but that seems very inefficient.