title: how to use the NOT operator ~ in jupyter notebook?
body: <p>I am creating a notebook and at some point I need to create a boolean mask. I use pandas version 17.1.</p>
  
  <p>That is, I generate</p>
  
  <pre><code>mask=df.var.str.contains('hello')
  </code></pre>
  
  <p>However, it seems that I am unable to use the logical operator NOT <code>~</code> in ipython notebook, so <code>~mask</code> generates an error <code>TypeError: bad operand type for unary ~: 'float'</code></p>
  
  <p>Actually, running <code>~False</code> in a cell gives me: -1</p>
  
  <p>What is happening here?</p>