title: Querying Pandas with a Dictionary of Constraints
body: <p>I am trying to pull out months within certain years with pandas. I have the constraints returned as such {month: year}.</p>
  
  <pre><code> [{1: 2003},
   {2: 2008},
   {3: 2011},
   {4: 2012},
   {5: 2008},
   {6: 2008},
   {7: 2002},
   {8: 2006},
   {9: 2005},
   {10: 2013},
   {11: 2005},
   {12: 2001}]
  </code></pre>
  
  <p>Means I want January 2003, February 2008, etc. from the data frame. I have "Month" and "Year" as two columns in the data frame. </p>
  
  <p>I want something that executes this incorrect code (but the idea is clear):</p>
  
  <pre><code>df[(df['Month'] == key for key in dict) &amp; (df['Year'] == dict[key])]
  </code></pre>