title: convert 6 digit int into to yyyymm in pandas
body: <p>I made a file that had three date columns:</p>
  
  <pre><code>pd.DataFrame({'yyyymm':[199501],'yyyy':[1995],'mm':[1],'Address':['AL1'],'Number':[12]})
      yyyymm  yyyy    mm  Address Number
  0   199501  1995    1   AL1     12
  </code></pre>
  
  <p>and saved it as a file:</p>
  
  <pre><code>df.to_csv('complete.csv')
  </code></pre>
  
  <p>I read in the file with:</p>
  
  <pre><code>df=pd.read_csv('complete.csv')
  </code></pre>
  
  <p>and my 3 date columns are converted to int's, and not dates.</p>
  
  <p>I tried to convert them back to dates with:</p>
  
  <pre><code>df['yyyymm']=df['yyyymm'].astype(str).dt.strftime('%Y%m')
  df['yyyy']=df['yyyy'].dt.strftime('%Y')
  df['mm']=df['mm'].dt.dtrftime('%m')
  </code></pre>
  
  <p>with the error:</p>
  
  <pre><code>AttributeError: Can only use .dt accessor with datetimelike values
  </code></pre>
  
  <p>Very odd, as the command I used to make the datetime column was:</p>
  
  <pre><code>df['yyyymm']=df['col2'].dt.strftime('%Y%m')
  </code></pre>
  
  <p>Am I missing something? HOw can I convert the 6 digit column back to yyyymm datetime, the 4 digit column to yyyy datetime, and the mm digit column back to datetime?</p>