title: pandas count number of occurrences of values in one column
body: <p>I have a long dataframe with only one column and around 800k rows. my data frame looks like this</p>
  
  <pre><code>54
  53
  53
  53
  53
  ...
  0
  0
  0
  </code></pre>
  
  <p>So what I need is to count the number of occurrences of each value and saving this into a dataframe so the result would be something like this</p>
  
  <pre><code>54 1
  53 1000
  52 800
  ...
  0 100000
  </code></pre>
  
  <p>I have tried using <code>df.groupby(0)</code> but it only returns an object. How can I get a two-column dataframe (or 1 column and a row-index showing the values)?</p>