title: How to store value in a variable and use that variable to filter data in pandas
body: <p>I have to take input which i store in  a variable and use that value to filter out data like this</p>
  <pre><code>u = 'Jun'
  duration = compda.query(&quot;Month==u&quot;).groupby('name').duration.mean().reset_index().values.tolist()
  </code></pre>
  <p>this doesnt work, however</p>
  <pre><code>duration = compda.query(&quot;Month=='Jun'&quot;).groupby('name').duration.mean().reset_index().values.tolist()
  </code></pre>
  <p>works</p>