Looking to see if someone know how to chain multiple conditions in pandas…. I am looking form something like this:
df[(df.col1>2)&df.col2<5) or (df.col5==5)&(df.col3>=78)]
so far I have found no solution that allows me to include an or condition like in my example.
Any help os appreciated1
same as and have a character so dose or use the | for or statement and sometimes pandas like more ()
df[((df.col1>2)&df.col2<5)) | ((df.col5==5)&(df.col3>=78))]