title: Python pandas integer YYYYMMDD to datetime
body: <p>Apologies in advance for this, but after two hours of searching and trying I cannot get the right answer here. I have a data frame, populated via pandas io sql.read_frame(). 
  The column that is proving to be too much for me is of <code>dtype</code> <code>int64</code>. The integers is of the format <code>YYYYMMDD</code>. for example <code>20070530</code> - 30th of may 2007. I have tried a range of approaches, the most obvious being; </p>
  
  <p><code>pd.to_datetime(dt['Date'])</code> and <code>pd.to_datetime(str(dt['Date']))</code></p>
  
  <p>with multiple variations on the functions different parameters. </p>
  
  <p>The result has been, at best, that the date interpreted as being the time. The date is set to <code>1970-01-01</code> - outcome as per above example <code>1970-01-01 00:00:00.020070530</code></p>
  
  <p>I also tried various <code>.map()</code> functions found in simular posts. </p>
  
  <p>I have noticed that according to <code>np.date_range()</code> can interpret string values of the format <code>YYYYMMDD</code>, but that is the closest I have come to seeing a solution. </p>
  
  <p>If anyone has an answer, I would be very greatful!</p>
  
  <p>EDIT: In view of the answer from Ed Chum, the problem is most likely related to encoding. <code>rep()</code> on a subset of the dataFrame yields:</p>
  
  <blockquote>
    <p>OrdNo    LstInvDt\n0<br>
    9    20070620\n1<br>
    11    20070830\n2<br>
    19    20070719\n3<br>
    21    20070719\n4<br>
    23    20070719\n5<br>
    26    20070911\n7<br>
    29    20070918\n8<br>
    31    0070816\n9<br>
    34    20070925\n10     </p>
  </blockquote>
  
  <p>This is when <code>LstInvDt</code> is dtype int64.</p>