title: How to convert pandas data frame datetime column to int?
body: <p>I am facing an issue while converting one of my <code>datetime</code> columns in <a href="/questions/tagged/pandas" class="post-tag" title="show questions tagged &#39;pandas&#39;" rel="tag">pandas</a> <a href="/questions/tagged/dataframe" class="post-tag" title="show questions tagged &#39;dataframe&#39;" rel="tag">dataframe</a> to <code>int.</code> My code is:</p>
  
  <pre><code>df['datetime_column'].astype(np.int64)
  </code></pre>
  
  <p>The error which I am getting is:</p>
  
  <blockquote>
    <p>invalid literal for int() with base 10: '2018-02-25 09:31:15'</p>
  </blockquote>
  
  <p>I am quite clueless about what is happening as the conversion for some of my other <code>datetime</code> columns are working fine. Is there some issue with the range of the date which can be converted to <code>int</code>? </p>