I'm trying to filter data with multiple conditions using .isin
I've created a dataframe with data like this.
col_a col_b col_c
abc yes a
abc no b
abc yes a
def no b
def yes a
def no b
def yes a
def no b
ghi yes a
ghi no b
ghi yes a
When I try this type of filtering, referring to this solution I seen on stack overflow I get back all NaN values. Pandas: Filtering multiple conditions
How can I apply the three conditions to filter?
fil_1 = test.isin({'col_a': ['abc','def','ghi']})
fil_2 = test.isin({'col_b': ['yes']})
fil_3 = test.isin({'col_c' :['a']})
data = test[fil_1 & fil_2 & fil_3]
data