Hi,
I have a csv-file with Date in first column, pressure in second and temperature in third (a lot of data). Small example below:
08/08/2012 09:26:01,14.334,26.379
08/08/2012 09:26:02,14.329,26.376
08/08/2012 09:26:03,14.337,26.394
08/08/2012 09:26:04,14.324,26.421
I want to extract from t1 to t2 and then calculate the elapsed time (t2>t1). My code so far:
a=pd.read_csv(filename, parse_dates=True, keep_date_col=True)
t=a.get('Time')
P=a.get('P')
T=a.get('T-(C)')
T1 = '2012-8-8 10:10:10'
T2 = '2012-8-8 10:10:30'
t1=dt.datetime.strptime(T1, "%Y-%m-%d %H:%M:%S")
t2=dt.datetime.strptime(T2, "%Y-%m-%d %H:%M:%S")
Find elapsed time: