title: Pandas dataframe to count matrix
body: <p>This must be obvious, but I couldn't find an easy solution. </p>
  
  <p>I have pandas DataFrame like this:</p>
  
  <pre><code>actual | predicted
  ------ + ---------
  Apple  | Apple
  Apple  | Apple
  Apple  | Banana
  Banana | Orange
  Orange | Apple
  </code></pre>
  
  <p>I want this: </p>
  
  <pre><code>       |  Apple  | Banana  | Orange
  ------ + ------- + ------- + -------
  Apple  |  2      | 1       | 0
  Banana |  0      | 0       | 1
  Orange |  1      | 0       | 0
  </code></pre>