Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

datediff in seconds in pandas

t1 = pd.to_datetime('1/1/2015 01:00')
t2 = pd.to_datetime('1/1/2015 03:30')

print pd.Timedelta(t2 - t1).seconds / 3600.0
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #datediff #seconds #pandas
ADD COMMENT
Topic
Name
1+7 =