I have a df with multiple columns and trying to select a subset of the data based on an OR logic:
df [ (df['col1']==0) | (df['col2']==0) | (df['col3']==0) | (df['col4']==0) |
(df['col5']==0) | (df['col6']==0) | (df['col7']==0) | (df['col8']==0) |
(df['col9']==0) | (df['col10']==0) | (df['col11']==0) ]
When I apply this logic the result is empty but I know some of the values are zero
All the values of the these column are int64.
I noticed that 'col11' are all 1's. When I remove 'col11' or swap the order of the query (e.g., putting "| (df['col11']==0)" in the middle )I get the expected results.
I wonder if anyone has had this problem or any ideas what's the reason I'm returning an empty df.