<code>
print end_date
122 2013-05-14 23:01:42
148 2013-05-14 23:08:56
150 2013-05-14 23:10:30
151 2013-05-14 23:00:30
152 2013-05-14 23:05:33
156 2013-05-14 23:02:40
157 2013-05-14 23:02:31
158 2013-05-14 23:02:43
159 2013-05-14 23:08:43
161 2013-05-14 23:05:55
162 2013-05-14 23:10:27
163 2013-05-14 23:09:07
165 2013-05-14 23:09:32
167 2013-05-14 23:00:47
168 2013-05-14 23:15:12
print start_date
122 2013-05-14 22:34:16
148 2013-05-14 22:41:30
150 2013-05-14 22:43:39
151 2013-05-14 22:43:41
152 2013-05-14 22:43:54
156 2013-05-14 22:45:25
157 2013-05-14 22:46:08
158 2013-05-14 22:46:35
159 2013-05-14 22:46:47
161 2013-05-14 22:47:12
162 2013-05-14 22:47:33
163 2013-05-14 22:47:39
165 2013-05-14 22:48:35
167 2013-05-14 22:48:55
168 2013-05-14 22:49:14
diff = (end_date - start_date)
print diff
122 00:27:26
148 00:27:26
150 00:26:51
151 00:16:49
152 00:21:39
156 00:17:15
157 00:16:23
158 00:16:08
159 00:21:56
161 00:18:43
162 00:22:54
163 00:21:28
165 00:20:57
167 00:11:52
168 00:25:58
</code>
<code>
diff.apply(lambda x: x.days)
*** AttributeError: 'numpy.timedelta64' object has no attribute 'days'
</code>
In [160]: y = s - s[0]
In [161]: y
Out[161]:
0 00:00:00
1 1 days, 00:00:00
2 2 days, 00:00:00
dtype: timedelta64[ns]
In [162]: y.apply(lambda x: x.item().total_seconds())
Out[162]:
0 0
1 86400
2 172800
dtype: float64
y.apply(lambda x: x.item()/np.timedelta64(1,'s'))
Would love some direction on how to port my old code to something that will work w 1.7.1