Pandas newbie here. I want to convert a date range time series date_time from pandas:
import pandas as pd
import numpy as np
In [1]: date_time = pd.date_range('2017/10/27','2017/10/29',freq='12H')
into a numpy array t containing the elapsed time (for instance, in hours), such that:
In [2]: t
Out[2]: array([0,12,24,36,48])
What would be the most direct way to do this?
I need this to pass the numpy array t to odeint routines.