title: Make a pandas dataframe group by count have a column name
body: <p>In python 3.6 and pandas 0.19.0 there is a dataframe "df"</p>
  
  <pre><code>id
  abc
  abc
  def
  </code></pre>
  
  <p>I am trying to create a dataframe with a id_count column, which is the same as SQL:  </p>
  
  <pre><code>SELECT id, COUNT(1) AS id_count FROM table group by id
  </code></pre>
  
  <p>ideal returns:</p>
  
  <pre><code>id  id_count
  abc 2
  def 1
  </code></pre>
  
  <p>I have tried:</p>
  
  <pre><code>print (df.groupby(['id'])['id'].count())
  </code></pre>
  
  <p>returns</p>
  
  <pre><code>id
  abc 2
  def 1
  
  print (df.groupby(['id'])['id'].transform('count'))
  </code></pre>
  
  <p>returns</p>
  
  <pre><code>0    2
  1    1
  </code></pre>
  
  <p>Any thoughts?  Thank you!</p>