title: Encoding categorical features stored as lists in Pandas DataFrame
body: <p>I have a Pandas series where categorical data stored as lists. I am trying to extract and encode them as categorical features for ML. I am not sure if the <code>encoders</code> from <code>sklearn.preprocessing</code> or any out of the box solution would work with lists.</p>
  <pre><code>import pandas as pd
  
  df = pd.DataFrame({
                     'id': [0, 1, 2],
                     'col1': ['yy','xx','zz'],
                     'col2': ['oo','pp','rr'],
                     'cats': [['A','B','C'],
                              ['U','O','T'],
                              ['T','C','U']]
                   })
  </code></pre>
  <p>Expected output:</p>
  <pre><code>id col1 col2 A B C U O T 
  0  yy   oo   1 1 1 0 0 0
  1  xx   pp   0 0 0 1 1 1
  2  zz   rr   0 0 1 1 0 1
  </code></pre>