title: How to filter pandas dataframe by string
body: <p>I have a dataframe with several columns. Here is an example: </p>
  
  <pre><code>A          B  C  D      MachineCall    F
  0  1 2013-01-02  1  3   Machine1  foo
  1  1 2013-01-02  1  3  Machine2  foo
  2  1 2013-01-02  1  3   Machine3  foo
  3  1 2013-01-02  1  3  Machine1  foo
  </code></pre>
  
  <p>I want to make a new dataframe that only uses data from rows with Machine1. I don't want to change the order of the columns. </p>
  
  <p>I tried</p>
  
  <pre><code>df2 = df2[(df2 == 'Machine1')]
  </code></pre>
  
  <p>which got the error </p>
  
  <p><code>TypeError: Could not compare ['Machine1'] with block values:</code></p>
  
  <p>and</p>
  
  <pre><code>df2 = df2[(df2'MachineCall'].isin('Machine1')]
  </code></pre>
  
  <p>which got </p>
  
  <p><code>TypeError: only list-like objects are allowed to be passed to Series.isin(), you passed a 'str'</code></p>