title: Trying to convert a serial date from excel into a date in python
body: <p>I'm trying to convert a list of serial numbers which I extracted from excel into proper dates in python using the code below. I am using a for loop to iterate over the array or list.</p>
  <pre><code>for i in excel_date_arr:
      dt = datetime.fromordinal(datetime(1900, 1, 1).toordinal() + excel_date_arr[i] - 2)
      tt = dt.timetuple()
      new_dates = new_dates.append(tt)
  </code></pre>
  <p>However, I keep getting errors. Below is the error that appears for the code above. I am totally new to python.</p>
  <hr />
  <blockquote>
  <p>IndexError                                Traceback (most recent call last)
   in 
  1 for i in excel_date_arr:
  ----&gt; 2     dt = datetime.fromordinal(datetime(1900, 1, 1).toordinal() + excel_date_arr[i] - 2)
  3     tt = dt.timetuple()
  4     new_dates = new_dates.append(tt)</p>
  </blockquote>
  <p>IndexError: only integers, slices (<code>:</code>), ellipsis (<code>...</code>), numpy.newaxis (<code>None</code>) and integer or boolean arrays are valid indices</p>