title: Using lists in a pandas query
body: <p>I am performing a query on a DataFrame:</p>
  
  <pre><code>Index Category
  1     Foo
  2     Bar
  3     Cho
  4     Foo
  </code></pre>
  
  <p>I would like to return the rows where the category is "Foo" or "Bar".
  When I use the code:</p>
  
  <pre><code>df.query("Catergory==['Foo','Bar']")
  </code></pre>
  
  <p>This works fine and returns:</p>
  
  <pre><code>Index Category
  1     Foo
  2     Bar
  4     Foo
  </code></pre>
  
  <p>However in future I will want the filter to be changed dynamically so I wrote:</p>
  
  <pre><code>filter_list=['Foo','Bar']
  df.query("Catergory==filter_list")
  </code></pre>
  
  <p>Which threw out the error:</p>
  
  <pre><code>UndefinedVariableError: name 'filter_list' is not defined
  </code></pre>
  
  <p>Other variations I tried with no success were:</p>
  
  <pre><code>df.query("Catergory"==filter_list)
  df.query("Catergory=="filter_list)
  </code></pre>
  
  <p>Respectively producing:</p>
  
  <pre><code>ValueError: expr must be a string to be evaluated, &lt;class 'bool'&gt; given
  SyntaxError: invalid syntax
  </code></pre>