Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas filter by dictionary

>>> df1.loc[(df1[list(filter_v)] == pd.Series(filter_v)).all(axis=1)]
   A  B      C  D
3  1  0  right  3
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pandas #filter #dictionary
ADD COMMENT
Topic
Name
4+9 =