title: pandas: dataframe from dict with comma separated values
body: <p>I'm trying to create a DataFrame from a nested dictionary, where the values are in comma separated strings.</p>
  
  <p>Each value is nested in a dict, such as:</p>
  
  <pre><code>dict = {"1":{
               "event":"A, B, C"},
          "2":{
               "event":"D, B, A, C"},
          "3":{
               "event":"D, B, C"}
          }
  </code></pre>
  
  <p>My desired output is:</p>
  
  <pre><code>    A   B   C   D
  0   A   B   C   NaN
  1   A   B   C   D
  2   NaN B   C   D
  </code></pre>
  
  <p>All I have so far is converting the dict to dataframe and splitting the items in each list. But I'm not sure this is getting me any closer to my objective.</p>
  
  <pre><code>df = pd.DataFrame(dict)
  Out[439]: 
             1           2        3
  event  A, B, C  D, B, A, C  D, B, C
  
  In [441]: df.loc['event'].str.split(',').apply(pd.Series)                                                                                                                                                                                 
  Out[441]: 
     0   1   2    3
  1  A   B   C  NaN
  2  D   B   A    C
  3  D   B   C  NaN
  </code></pre>
  
  <p>Any help is appreciated. Thanks</p>