Python Pandas: TypeError: unsupported operand type(s) for +: 'datetime.time' and 'Timedelta'

后端 未结 2 2036
南旧
南旧 2020-12-29 15:11

I am attempting to add two series in a dataframe in pandas with the first series being a 24-hr time value (e.g. 17:30) exported from an excel file and the second series bein

2条回答
  •  滥情空心
    2020-12-29 15:47

    Try this:

    import datetime as dt
    
    df["end_Time"] = df["Start_Time"] + df["Delta"].map(dt.timedelta)
    

提交回复
热议问题