I think there is some confusion in your understanding, but anyway
import pandas as pd import numpy as np df = pd.DataFrame([['2017-11-10', 4470.76], ['2017-11-11', 5465.72], ['2017-11-12', 15465.72]], columns=['Date_Time', 'eie']) y = np.array(df['eie'], dtype=float) x = np.array(pd.to_datetime(df['Date_Time'], format='%Y-%m-%d'), dtype='datetime64[D]') print(y) print(x)
Output:[ 4470.76 5465.72 15465.72]
['2017-11-10' '2017-11-11' '2017-11-12']
orimport pandas as pd import numpy as np df = pd.DataFrame([['2017-11-10', 4470.76], ['2017-11-11', 5465.72], ['2017-11-12', 15465.72]], columns=['Date_Time', 'eie']) y = np.array(df['eie'], dtype=float) x = np.array(pd.to_datetime(df['Date_Time'].index.values+1, format='%Y-%m-%d'), dtype=int) print(y) print(x)
Output:[ 4470.76 5465.72 15465.72]
[1 2 3]
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs