title: elementwise and on two pandas series
body: <p>I want to create a new Boolean column on a pandas <code>DataFrame</code> based on two conditions. The following errors:</p>
  
  <pre><code>df['new'] = df['old'] != 'A' &amp; df['old'] != 'B'
  </code></pre>
  
  <p>with </p>
  
  <blockquote>
    <p>TypeError: cannot compare a dtyped [object] array with a scalar of
    type [bool]</p>
  </blockquote>
  
  <p><code>and</code> and <code>&amp;&amp;</code> also error.</p>
  
  <p>What is the correct way to do this?</p>