title: Groupby one column and split the count based on another column
body: <p>I have a dataframe like so:</p>
  
  <pre><code>ID    Category
  1        A
  1        B
  1        A
  1        B
  2        A
  2        C
  2        C
  2        A
  2        D
  3        E
  </code></pre>
  
  <p>How can I groupby the <code>ID</code> column and perform a count of each category?</p>
  
  <p>I.E.</p>
  
  <pre><code>ID    A   B   C   D  E
  1     2   2   0   0  0
  2     2   0   2   1  0
  3     0   0   0   0  1
  </code></pre>
  
  <p>I have tried <code>df.groupby('ID').count()</code> &amp; <code>df.groupby('ID')['Category']</code></p>