Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

select inverse with conditions pandas

In [411]:
df_a[~((df_a['id'].isin(values1)) & (df_a['car'].isin(values2)))]
#     ^                                                        ^
Out[411]:
   id    car
3  s4  mazda
5  s5    bmw
6  s4   audi
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #select #inverse #conditions #pandas
ADD COMMENT
Topic
Name
6+4 =