title: Handling dates with mix of two and four digit years in python
body: <p>I have two DataFrame df:</p>
  
  <pre><code> A                B
  5/4/2018     8/4/2018 
  24/5/15       26/5/15 
  21/7/16       22/7/16 
  3/7/2015     5/7/2015 
  1/7/2016     1/7/2016 
  </code></pre>
  
  <p>I want to calculate the difference of days for each row.<BR>
  for example:</p>
  
  <pre><code>A                B             C 
  5/4/2018     8/4/2018          3 
  24/5/15       26/5/15          2 
  </code></pre>
  
  <p>I have tried to convert dataframe into datetime using pd.to_datetime. but, getting error "ValueError: unconverted data remains: 18"</p>
  
  <p>tried following code:</p>
  
  <pre><code>import datetime as dt
  
  df['A'] = pd.to_datetime(df['A'], format = "%d/%m/%y").datetime.datetime.strftime("%Y-%m-%d")
  
  df['B'] = pd.to_datetime(df['B'], format = "%d/%m/%y").datetime.datetime.strftime("%Y-%m-%d")
  
  df['C'] = (df['B'] - df['A']).dt.days
  </code></pre>
  
  <p>note :using python 3.7</p>