title: Adding a list to a column when iterating over a dataframe row
body: <p>I have the following dataframe:</p>
  
  <pre><code>import numpy as np
  import pandas as pd
  import random
  df = pd.DataFrame(np.random.randint(0,20,size=(2, 2)), columns=list('AB'))
  df
  
      A   B
  0   13  4
  1   16  17
  </code></pre>
  
  <p>Then I create another dataframe in a loop where the columns of the dataframe are lists. There is a post here (<a href="https://stackoverflow.com/questions/35491274/pandas-split-column-of-lists-into-multiple-columns">Pandas split column of lists into multiple columns</a>) that shows to split the columns.</p>
  
  <pre><code>tmp_lst_1 = []
  for index, row in df.iterrows():
      tmp_lst_2 = []
      for r in range(len(row)):
          tmp_lst_2.insert(r, random.sample(range(1, 50), 2) )
      tmp_lst_1.insert(index, tmp_lst_2)
  
  df1 = pd.DataFrame(tmp_lst_1)
  df1
       0             1
  0   [21, 5]     [6, 42]
  1   [49, 40]    [8, 45]
  </code></pre>
  
  <p>but I was wondering if there is a more efficient way to create this dataframe without needing to split all the columns individually? I am looking to get something like this:</p>
  
  <pre><code>df1
      C  D  E F  
  0   21 5  6 42
  1   49 40 8 45
  </code></pre>