how to add another timestamp column plus two hours

Solutions on MaxInterview for how to add another timestamp column plus two hours by the best coders in the world

showing results for - "how to add another timestamp column plus two hours"
Guadalupe
26 Jun 2020
1    from datetime import timedelta
2    two_hours = pd.Timedelta(hours=2)
3    df["dummy_date"] = df["Date_Time"] + two_hours
4    df
5
6    Date_Time               Date    Duration    value   Remark      dummy_date
70   2018-08-14 02:00:00     2018-08-14    3     4     e         2018-08-14 04:00:00
81   2018-08-14 01:00:00     2018-08-14    0     3     o         2018-08-14 03:00:00
92   2018-08-14 00:00:00     2018-08-14    0     2     k         2018-08-14 02:00:00
103   2018-08-13 23:00:00     2018-08-13    10    1     x         2018-08-14 01:00:00
114   2018-08-13 22:00:00     2018-08-13    2     0     c         2018-08-14 00:00:00
125   2018-08-13 21:00:00     2018-08-13    20    23    z         2018-08-13 23:00:00
136   2018-08-13 20:00:00     2018-08-13    1     22    a         2018-08-13 22:00:00
14
similar questions