I would like to slice a
which satisfies condition A or
condition B. Most of the search results only show how to slice dataframe using "and"
. So I wonder if it is possible to use "or"
operator without converting (A and B) to (not (not A and not B))? Because sometimes there are many "or" conditions needed, and converting might be troublesome.
I tried to use:
df[(df['c1']==x1) or (df['c2']==x2)]
but it does not work.