title: Using python pandas to parse CSV with date in format Year, Day, Hour, Min, Sec
body: <p>I have several CSV files with the format:</p>
  
  <pre><code>Year,Day,Hour,Min,Sec.,P1'S1
   2003,  1, 0, 0,12.22, 0.541
   2003,  1, 1, 0,20.69, 0.708
   2003,  1, 2, 0, 4.95, 0.520
   2003,  1, 3, 0,13.42, 0.539
  ...
  </code></pre>
  
  <p>(where <em>day</em>, is the <em>day of the year</em>) and I'm trying to read them using the <strong>pandas</strong> library (seems a fantastic lib so far).</p>
  
  <p>There is a built-in function to read CSV in pandas, and even better, that function supposedly checks the columns for a date type. and automatically uses that as an index (which would be exactly perfect for what I'm doing).</p>
  
  <p>The thing is, I cannot get it to work with date data in this format.</p>
  
  <p>I tried:</p>
  
  <pre><code>data = pd.read_csv("csvFile.csv", index_col=[0, 1],  , index_col=[0, 1, 2, 3, 4] parse_dates=True)
  </code></pre>
  
  <p>but <strong>it only gets the year correctly</strong>:</p>
  
  <pre><code>In [36]: data.index
  Out[36]: 
  MultiIndex
  [(&lt;Timestamp: 2003-09-04 00:00:00&gt;, 1, 0, 0, 12.22)
   (&lt;Timestamp: 2003-09-04 00:00:00&gt;, 1, 1, 0, 20.69)
   (&lt;Timestamp: 2003-09-04 00:00:00&gt;, 1, 2, 0, 4.95) ...,
   (&lt;Timestamp: 2003-09-04 00:00:00&gt;, 365, 21, 0, 3.77)
   (&lt;Timestamp: 2003-09-04 00:00:00&gt;, 365, 22, 0, 14.6)
   (&lt;Timestamp: 2003-09-04 00:00:00&gt;, 365, 23, 0, 13.36)]
  </code></pre>
  
  <p>From the documentation, I see that you can specify the <strong>"date_parser" attribute in the read_csv function of pandas</strong>. But the documentation doesn't show how and I'm not being able to figure it out.
  Anyone with experience in the subject that can give a hand.</p>
  
  <p>Cheers,
  Bruno</p>