title: Pandas: split list in column into multiple rows
body: <p>I have a question regarding splitting a list in a dataframe column into multiple rows.</p>
  
  <p>Let's say I have this dataframe:</p>
  
  <pre><code>  Job position   Job type  id
  0          [6]        [1]   3
  1       [2, 6]  [3, 6, 5]   4
  2          [1]        [9]  43
  </code></pre>
  
  <p>I would like every single combination of numbers, so the final result would be:</p>
  
  <pre><code>   id    Job position  Job type
  0   3         6.0       1.0
  1   4         2.0       3.0
  2   4         2.0       6.0
  3   4         2.0       5.0
  4   4         6.0       3.0
  5   4         6.0       6.0
  6   4         6.0       5.0
  7  43         1.0       9.0
  </code></pre>
  
  <p>Because right now I get this result:</p>
  
  <pre><code>   id    Job position  Job type
  0   3         6.0       1.0
  1   4         2.0       3.0
  2   4         6.0       6.0
  3   4         NaN       5.0
  4  43         1.0       9.0
  </code></pre>
  
  <p>In order to get the result above, I did:</p>
  
  <pre><code>df = df.set_index(['id'])
  (df.apply(lambda x: pd.DataFrame(x.tolist(),index=x.index)
                          .stack()
                          .rename(x.name)).reset_index())
  </code></pre>