title: Convert pandas DataFrame to lists, with column names as list names
body: <p>I want to convert a data frame so that each column becomes one list, named by the column name. To give an example, suppose I have the following data frame</p>
  
  <pre><code>import pandas as pd
  
  d = {'A' : [1, 2, 3, 4],
       'B' : ['x', 'y', 'z', 'w']}
  
  df = pd.DataFrame(d)
  
  print(df)
  
     A  B
  0  1  x
  1  2  y
  2  3  z
  3  4  w
  </code></pre>
  
  <p>The desired output is to have</p>
  
  <pre><code>A = [1,2,3,4]
  B = ['x', 'y', 'z', 'w']
  </code></pre>
  
  <p>I know how to get the column names as well as the values into list format separately or together in the following ways: </p>
  
  <pre><code>test1 = df.T.reset_index().values.tolist()
  print(test1)
  [['A', 1, 2, 3, 4], ['B', 'x', 'y', 'z', 'w']]
  
  test2 = df.T.values.tolist()        
  print(test2)
  [[1, 2, 3, 4], ['x', 'y', 'z', 'w']]
  
  test3 = df.columns.values.tolist()
  print(test3)
  ['A', 'B']                 
  </code></pre>
  
  <p>But I cannot figure out if/how I can name the lists created in test2 the names as given by the column names. </p>