我尝试
closure2['NEXT_PERF_DT'] = closure2['perf_dt'].apply(lambda x: dt.datetime((x.year)+(x.month/12), (x.month%12)+1,1))
但是我明白了,
TypeError: integer argument expected, got float
Closure2只有两列:
perf_dt 10002 non-null datetime64[ns]
unknown_exit 10002 non-null int64
有人知道我在做什么错吗?