title: pandas select rows based on values in dictionary
body: <p>Im am trying to select rows from a pandas dataframe, based on a variable amount of columns and values. For a fixed column and value, one can do this:</p>
  <pre><code>df = pd.DataFrame([{'name' : 'ruben','age' : 25},{'name' : 'henk', 'age' : 26},{'name' : 'gijs', 'age' : 20}])
  
  column_name = 'name'
  column_value = 'ruben'
  
  rows = df[df[column_name] == column_value]
  </code></pre>
  <p>However, I want to do this for a variable amount of column-value pairs, for example from a list</p>
  <pre><code>df = pd.DataFrame([{'name' : 'ruben','age' : 25},{'name' : 'henk', 'age' : 26},{'name' : 'gijs', 'age' : 20}])
  
  column_value_pairs = {'name' : 'ruben','age' : '25'}
  rows = df[???]
  </code></pre>
  <p>Which then should return all rows where the name is ruben and the age is 25. So basically this:</p>
  <pre><code>rows = df[(df['name'] == 'ruben') &amp; (df['age'] == 25)]
  </code></pre>
  <p>But instead with columns and values from the dictionary.</p>