title: pandas not condition with filtering
body: <p>How I can implement not condition on the filtering </p>
  
  <pre><code>grouped = store_ids_with_visits.groupby(level=[0, 1, 2])
  grouped.filter(lambda x: (len(x) == 1 and x['template_fk'] == exterior_template))
  </code></pre>
  
  <p>I want to get all entries that not answering on the condition</p>
  
  <p>I tried doing:</p>
  
  <pre><code>grouped.filter(lambda x: ~(len(x) == 1 and x['template_fk'] == exterior_template))
  </code></pre>
  
  <p>But got following error:  </p>
  
  <pre><code>filter function returned a int, but expected a scalar bool
  </code></pre>