title: Pandas Flatten a list of list within a column?
body: <p>I am trying to flatten a column which is a list of lists:</p>
  
  <pre><code>    var         var2
  0   9122532.0   [[458182615.0], [79834910.0]]
  1   79834910.0  [[458182615.0], [9122532.0]]
  2   458182615.0 [[79834910.0], [9122532.0]]
  </code></pre>
  
  <p>I want:</p>
  
  <pre><code>    var         var2
  0   9122532.0   [458182615.0, 79834910.0]
  1   79834910.0  [458182615.0, 9122532.0]
  2   458182615.0 [79834910.0, 9122532.0]
  </code></pre>
  
  <p>Applying</p>
  
  <pre><code>sample8['var2'] = sample8['var2'].apply(chain.from_iterable).apply(list)
  </code></pre>
  
  <p>Gives me:</p>
  
  <pre><code>    var1        var2
  0   9122532.0   [[, 4, 5, 8, 1, 8, 2, 6, 1, 5, ., 0, ], [, 7, ...
  1   79834910.0  [[, 4, 5, 8, 1, 8, 2, 6, 1, 5, ., 0, ], [, 9, ...
  2   458182615.0 [[, 7, 9, 8, 3, 4, 9, 1, 0, ., 0, ], [, 9, 1, ...
  </code></pre>