title: pandas: Split separated values in a DataFrame column (one Series) into multiple Columns. Elegant solutions?
body: <p>I have a column in a DataFrame (which is a column in a csv) which are comma-separated values. I'd like to split this column into multiple columns. </p>
  
  <p>The problem is an old one, and has been discussed here also, but there is one peculiarity: one entry may be from <code>0-n</code> comma-separated values. An example:</p>
  
  <pre><code>df.head():
  
  i: vals   | sth_else 
  ---------------------
  1: a,b,c  | ba
  2: a,d    | be
  3:        | bi
  4: e,a,c  | bo
  5: e      | bu
  </code></pre>
  
  <p>I'd like the following output (or similar, e.g. True/False):</p>
  
  <pre><code>i : a | b | c | d | e |  sth_else 
  -----------------------------------
  1:  1 | 1 | 1 | 0 | 0 | ba
  2:  1 | 0 | 0 | 1 | 0 | be
  3:  0 | 0 | 0 | 0 | 0 | bi
  4:  1 | 0 | 1 | 0 | 1 | bo
  5:  0 | 0 | 0 | 0 | 1 | bu
  </code></pre>
  
  <p>I'm currently experimenting with the <code>Series.str.split</code> and then <code>Series.to_dict</code> functions, but with out any satisfactory results (causing always a <code>ValueError: arrays must all be same length</code>. :)</p>
  
  <p>Also, I always try to find elegant solutions which are easily understandable when looked at after a couple of months ;). In any case, propositions are highly appreciated!</p>
  
  <p>Here is the <code>dummy.csv</code> for testing.</p>
  
  <pre><code>vals;sth_else 
  a,b,c;ba
  a,d;be
  ;bi
  e,a,c;bo
  e;bu
  </code></pre>