【发布时间】:2020-10-18 12:56:31
【问题描述】:
我有日期列中的数据,我想转换为日期时间,出现如下错误
Month Sales of shampoo over a three year period
0 1-01 266.0
1 1-02 145.9
2 1-03 183.1
3 1-04 119.3
4 1-05 180.3
pd.to_datetime(data['Month'])
错误:-
OutOfBoundsDatetime: Out of bounds nanosecond timestamp: 1-01-01 00:00:00
在这种情况下我应该怎么做:-
【问题讨论】:
-
什么是“月”列格式?它是“月日”吗?
-
这里
1代表年份,02代表当年月份
标签: python pandas datetime time-series