title: Pandas DataFrame : How to select rows on multiple conditions?
body: <p>I'm trying to select rows of a DataFrame based on a list of conditions that needs to be all satisfied.
  Those conditions are stored in a dictionary and are of the form {column: max-value}.</p>
  
  <p>This is an example: <code>dict = {'name': 4.0, 'sex': 0.0, 'city': 2, 'age': 3.0}</code></p>
  
  <p>I need to select all DataFrame rows where the corresponding attribute is less than or equal to the corresponding value in the dictionary.</p>
  
  <p>I know that for selecting rows based on two or more conditions I can write:</p>
  
  <pre><code>rows = df[(df[column1] &lt;= dict[column1]) &amp; (df[column2] &lt;= dict[column2])]
  </code></pre>
  
  <p>My question is, how can I select rows that matches the conditions present in a dictionary in a Pythonic way?
  I tried this way,</p>
  
  <pre><code>keys = dict.keys() 
  rows = df[(df[kk] &lt;= dict[kk]) for kk in keys]
  </code></pre>
  
  <p>but it gives me an error = "<code>[ expected</code>" that doesn't disappear even putting the <code>[</code> symbol.</p>