datediff in seconds in pandas

Solutions on MaxInterview for datediff in seconds in pandas by the best coders in the world

showing results for - "datediff in seconds in pandas"
Lorenzo
18 Mar 2017
1t1 = pd.to_datetime('1/1/2015 01:00')
2t2 = pd.to_datetime('1/1/2015 03:30')
3
4print pd.Timedelta(t2 - t1).seconds / 3600.0
5