title: How to read a formatted text file with some header, column names, and data?
body: <p>I am essentially using pandas to read in a formatted text file with a header, column names, and data but I am unable to get the final product. I want the header info in a variable, the column names and data in a dataframe. What am I doing wrong here?</p>
  
  <p>I have tried using <code>pandas.read_csv</code>...see below code. Here is the text file:</p>
  
  <pre><code>2018 IOWA Data Version A229033
  Year Mon Day Jday  Hr Min    Rate  Lat        Lon
  2018  01  08  008  16  45    3.05  38.07760  -75.55848
  2018  01  08  008  16  46    3.05  38.07760  -75.55848
  2018  01  08  008  16  47    3.05  38.07760  -75.55848
  2018  01  08  008  16  48    3.05  38.07760  -75.55848
  2018  01  08  008  16  49    3.05  38.07760  -75.55848
  2018  01  08  008  20  25    3.05  38.07760  -75.55848
  2018  01  08  008  20  26    3.05  38.07760  -75.55848
  </code></pre>
  
  <p>python</p>
  
  <pre><code>cols=['year', 'mon', 'day', 'jday', 'hr', 'min', 'rate', 'lat', 'lon']
  data=pd.read_csv(file, names=cols, skiprows=1, header=None)
  </code></pre>
  
  <p>In the end, I want to be able to access each column and row in the format <code>data[year][0]</code>. Any help with this would be appreciated.</p>