title: How to utilise the date_parser parameter of pandas.read_csv()
body: <p>I am getting an issue with the <code>timestamp</code> column in my csv file.</p>
  
  <blockquote>
    <p>ValueError: could not convert string to float: '2020-02-21 22:00:00'</p>
  </blockquote>
  
  <p>for this line:</p>
  
  <pre><code>    import numpy as np
  import pandas as pd
  import matplotlib.pylab as plt 
  from datetime import datetime
  from statsmodels.tools.eval_measures import rmse
  from sklearn.preprocessing import MinMaxScaler
  from keras.preprocessing.sequence import TimeseriesGenerator
  from keras.models import Sequential
  from keras.layers import Dense
  from keras.layers import LSTM
  from keras.layers import Dropout
  import warnings
  warnings.filterwarnings("ignore")
  
  "Import dataset"
  df = pd.read_csv('fx_intraday_1min_GBP_USD.csv')
  
  
  train, test = df[:-3], df[-3:]
  scaler = MinMaxScaler()
  scaler.fit(train) &lt;----------- This line
  train = scaler.transform(train)
  test = scaler.transform(test)
  
  n_input = 3
  n_features = 4
  
  generator = TimeseriesGenerator(train, train, length=n_input, batch_size=6)
  
  model = Sequential()
  model.add(LSTM(200, activation='relu', input_shape=(n_input, n_features)))
  model.add(Dropout(0.15))
  model.add(Dense(1))
  model.compile(optimizers='adam', loss='mse')
  model.fit_generator(generator, epochs=180)
  </code></pre>
  
  <p>How can I convert the <code>timestamp</code> column (preferably when reading the csv) to a float?</p>
  
  <p><a href="https://i.stack.imgur.com/RjzsE.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RjzsE.jpg" alt="enter image description here"></a></p>
  
  <p><strong>Link to the dataset</strong>: <a href="http://Stock%20DataSet" rel="nofollow noreferrer">https://www.alphavantage.co/query?function=FX_INTRADAY&amp;from_symbol=GBP&amp;to_symbol=USD&amp;interval=1min&amp;apikey=OF7SE183CNQLT9DW&amp;datatype=csv</a></p>