title: How can I convert a date variable into "int" in Python?
body: <p>I am working on a regression problem, the data is presented as a csv file of three columns where the second columns contains the dates, I want to convert the date ( format: 1/1/2015  12:00:00 ) into an int (112015120000) in order to be able to normalize and apply my model. 
  I proceeded this way: </p>
  
  <pre><code>data_set = pd.read_csv('train.csv')
  date = data_set['Date'] # Dates represent the header of the dates' column
  dates = date.values
  date1 = [date.replace("-","") for date in dates ]
  date2 = [date.replace(":","") for date in date1 ]
  date_train = [date.replace(" ","") for date in date2 ]
  </code></pre>
  
  <p>but I feel it's a lot time consuming and inefficient, is there any shorter way to do it ? otherwise, is it possible to apply the normalization straightforwardly on a datetime type ? </p>