title: How to assign Dataframe column header names to column variable with iteration
body: <p>I am trying to iterate through dataframe header names and assign each name to the respective column values such that printing the name of each header will print the column data assigned to that header name. Current code: </p>
  
  <pre><code>import pandas as pd
  
  filepath = "...data"
  
  df = pd.DataFrame.from_csv(filepath, header=0, index_col=None)
  
  for i in list(df):
      print i
      i = str(i)
      i = df[i]
  
  print(cal_z)
  </code></pre>
  
  <p>result: </p>
  
  <pre><code>C:\...TFS_plot.py"
  
  wavelength (nm)
  Mix1_p
  Ccal_p
  Mix1_zero
  Cal_zero
  Mix_deriv
  Cal_deriv
  Unnamed: 7
  Mix1_raw
  Cal_rawzero
  Mix1_rawderiv
  
  Traceback (most recent call last):
    File "C:\....TFS_plot.py", line 14, in &lt;module&gt;
      print(cal_z)
  NameError: name 'Mix1_p' is not defined
  </code></pre>
  
  <p>Is there something wrong with the way I am assigning the iterator to the variable df[i]? </p>
  
  <p>example data: </p>
  
  <pre><code>cat dog
  3   1
  2   2
  1   4
  
  print dog
  </code></pre>
  
  <p>result:</p>
  
  <pre><code>(1,2,4)
  </code></pre>