So I got a strange question...
I'm basically trying to do some filtering on a dataframe, and I realized these 2 lines result in a error.
sel = data[(data["Fare"] == 50) and (data["Sex"].isin(["male"]))]
sel = data[(data["Fare"] == 50) or (data["Sex"].isin(["male"]))]
But when I use | and &, instead of 'and' and 'or', it WORKS:
sel = data[(data["Fare"] == 50) & (data["Sex"].isin(["male"]))]
sel = data[(data["Fare"] == 50) | (data["Sex"].isin(["male"]))]
So my question is, why does the 'and' and 'or' not work?
Why do only the symbols work instead?