I have a pandas Series called 'df' as follows
value
date_time_index
2015-10-28 01:54:00 1.0
2015-10-28 01:55:00 1.0
2015-10-28 01:56:00 1.0
2015-10-28 01:57:00 1.0
2015-10-28 01:58:00 1.0
and I just want a new column with the difference in seconds between consecutive rows, how can I do this?
Note: The type is
type(df.index[1])
given as
pandas.tslib.Timestamp