title: create a new dataframe from selecting specific rows from existing dataframe python
body: <p>i have a table in my pandas dataframe. df</p>
  
  <pre><code>id count price
  1    2     100
  2    7      25
  3    3     720
  4    7     221
  5    8     212
  6    2     200
  </code></pre>
  
  <p>i want to create a new dataframe(df2) from this, selecting rows where count is 2 and price is 100,and count is 7 and price is 221</p>
  
  <p>my output should be df2 =</p>
  
  <pre><code>id count price
  1    2     100
  4    7     221
  </code></pre>
  
  <p>i am trying using <code>df[df['count'] == '2' &amp; df['price'] == '100']</code></p>
  
  <p>but getting error</p>
  
  <pre><code>TypeError: cannot compare a dtyped [object] array with a scalar of type [bool]
  </code></pre>