I have some data in a pandas df like:
time delay 2017/06/14 10:02:10.144927 PM 15 The time is obviously a timestamp and in the delay is in seconds. df.dtypes are datetime64[ns] and int respectively. I want to add a column that has the timestamp of the original time plus the seconds passed, e.g.:
time delay end_time 2017/06/14 10:02:10.144927 PM 15 2017/06/14 10:02:25.144927 PM I'm trying to do
df["end_time"] = df.time.add(datetime.timedelta(seconds = df.time)) However I get an error TypeError: unsupported type for timedelta seconds component: Series. How would I do this? Do I need a lambda?
df.timeis a series of numbers. I think you wanted this to be element wise right?