title: one hot encoding with multiple categorical values per row in python
body: <p>I want to implement one hot encoding to a categorical feature in python 3.
  I notice that few of the id's have more than one categorical value.</p>
  
  <p>My table:</p>
  
  <pre><code>id  type
  13   A
  13   B
  2    A
  34   C
  34   A
  34   B
  </code></pre>
  
  <p>My desire output:</p>
  
  <pre><code>id  type@A  type@B  type@C
  13     1      1       0
  2      1      0       0
  34     1      1       1
  </code></pre>
  
  <p>what can I do?</p>