title: Pandas converting all data to NaN after adding column values
body: <p>I'm trying to add column headers to the following set of data. As per specifications of the project, I cannot simply modify the file to add those headers manually.</p>
  
  <p>Sample of the data that I'm working with:</p>
  
  <pre><code>38.049133   0.224026 0.05398  -19.11 -20.03
  38.352526   0.212491 0.05378  -18.35 -19.19
  38.363598   0.210654 0.05401  -20.11 -20.89
  54.936819   0.216794 0.20114  -20.94 -21.88
  54.534881   0.578615 0.12887  -19.75 -20.66
  54.743075   0.508774 0.18331  -20.54 -21.53
  54.867240   0.562636 0.13956  -19.95 -20.85
  54.856908   0.544031 0.13938  -20.14 -21.03
  54.977748   0.501912 0.13923  -20.27 -21.01
  54.992762   0.460376 0.12723  -20.24 -20.83 
  </code></pre>
  
  <p>I've created an array of 5 strings to act as the headers of each of the columns within this DataFrame. Using the designated header does select only that column (i.e. <code>print(df['z'])</code> does only print that one column (supposedly) but all of the data in the DataFrame, that displays just fine (i.e. shows the above sample lines exactly and detects the columns properly) when I do not specify columns, suddenly becomes "NaN" when I specify column titles from the array of strings.</p>
  
  <p>Sample of my code:</p>
  
  <pre><code>... imports and whatnot not shown
  
  dataColumns = ['RA', 'DEC', 'z', 'M(g)', 'M(r)']
  dataFile = pd.read_csv(data = 'file_name', delim_whitespace = True)
  df = pd.DataFrame(data = dataFile, columns = dataColumns)
  
  print(df)
  </code></pre>
  
  <p>Sample output of the above code (it is supposed to display exactly the sample data above but with added column headers):</p>
  
  <pre><code>RA   DEC z  M(g) M(r)
  NaN   NaN NaN  NaN NaN
  NaN   NaN NaN  NaN NaN
  NaN   NaN NaN  NaN NaN
  NaN   NaN NaN  NaN NaN
  NaN   NaN NaN  NaN NaN
  NaN   NaN NaN  NaN NaN
  NaN   NaN NaN  NaN NaN
  NaN   NaN NaN  NaN NaN
  NaN   NaN NaN  NaN NaN
  NaN   NaN NaN  NaN NaN
  </code></pre>
  
  <p>Why is it that, without specifying the 'columns' parameter for DataFrame, the data will properly print wheras after specifying the parameter, everything displays as NaN?</p>
  
  <p>Any help would be appreciated!</p>
  
  <p>-- paanvaannd</p>