title: Date Comparison in python pandas
body: <p>I have to compare two columns containing date values and find the difference between the 2 dates. </p>
  
  <p>Out of the 2 columns one is of <code>datetime</code> type however another is an <code>object</code> type. W
  hen trying to convert the object type to datetime using:</p>
  
  <pre><code>final['Valid to']=pd.to_datetime(final['Valid to'])
  </code></pre>
  
  <p>I am getting an error:</p>
  
  <blockquote>
    <p>OutOfBoundsDatetime: Out of bounds nanosecond timestamp: 9999-12-31
    00:00:00</p>
  </blockquote>
  
  <p>How to convert the column of object type to datetime so that i can compare and get the required result?</p>