title: Get day of year from a string date in pandas dataframe
body: <p>I want to turn my date string into day of year... I try this code..</p>
  
  <pre><code>import pandas as pd
  import datetime
  
  data = pd.DataFrame()
  data = pd.read_csv(xFilename, sep=",")
  </code></pre>
  
  <p>and get this DataFrame</p>
  
  <pre><code>Index Date        Tmin    Tmax
  0   1950-01-02  -16.508 -2.096
  1   1950-01-03  -6.769  0.875
  2   1950-01-04  -1.795  8.859
  3   1950-01-05  1.995   9.487
  4   1950-01-06  -17.738 -9.766
  </code></pre>
  
  <p>I try this...</p>
  
  <pre><code>convert = lambda x: x.DatetimeIndex.dayofyear
  data['Date'].map(convert)
  </code></pre>
  
  <p>with this error:</p>
  
  <pre><code>AttributeError: 'str' object has no attribute 'DatetimeIndex'
  </code></pre>
  
  <p>I expect to get new date to match 1950-01-02 = 2, 1950-01-03 = 3...
  Thank for your help... and sorry Im new on python </p>