title: python - binary encoding of column containing multiple terms
body: <p>I need to do a binary transformation of a column containing lists of strings separated by <code>comma</code>.</p>
  
  <p>Can you help me in getting from here:</p>
  
  <pre><code>df = pd.DataFrame({'_id': [1,2,3],
                     'test': [['one', 'two', 'three'], 
                              ['three', 'one'], 
                              ['four', 'one']]})
  df
  
  _id  test
   1   [one, two, three]
   2   [three, one]
   3   [four, one]
  </code></pre>
  
  <p>to:</p>
  
  <pre><code>df_result = pd.DataFrame({'_id': [1,2,3], 
                            'one': [1,1,1], 
                            'two': [1,0,0], 
                            'three': [1,1,0], 
                            'four': [0,0,1]})
  
  df_result[['_id', 'one', 'two', 'three', 'four']]
  
   _id    one two  three  four
     1    1   1    1      0
     2    1   0    1      0
     3    1   0    0      1
  </code></pre>
  
  <p>Any help would be very appreciated!</p>