title: With Pandas in Python, select only the rows where group by group count is 1
body: <p>I've filtered my data as suggested here: <a href="https://stackoverflow.com/questions/31361599/with-pandas-in-python-select-the-highest-value-row-for-each-group">With Pandas in Python, select the highest value row for each group</a></p>
  
  <pre><code>    author        cat  val
  0  author1  category2   15
  1  author2  category4    9
  2  author3  category1    7
  3  author3  category3    7  
  </code></pre>
  
  <p>Now, I want to only get the authors present in this data frame once. I wrote this, but it doesn't work:</p>
  
  <pre><code>def where_just_one_exists(group):
          return group.loc[group.count() == 1]
  most_expensive_single_category = most_expensive_for_each_model.groupby('author', as_index = False).apply(where_just_one_exists).reset_index(drop = True)
  print most_expensive_single_category
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>  File "/home/mike/anaconda/lib/python2.7/site-packages/pandas/core/indexing.py", line 1659, in check_bool_indexer
      raise IndexingError('Unalignable boolean Series key provided')
  pandas.core.indexing.IndexingError: Unalignable boolean Series key provided
  </code></pre>
  
  <p>My desired output is:</p>
  
  <pre><code>    author        cat  val
  0  author1  category2   15
  1  author2  category4    9
  2  author3  category1    7
  3  author3  category3    7 
  </code></pre>