【发布时间】:2018-08-20 20:52:22
【问题描述】:
我有两列,一列的类型为 datetime64 和 datetime.time。这 第一列有日期,第二列有小时和分钟。我 无法解析它们:
Leistung_0011
ActStartDateExecution ActStartTimeExecution
0 2016-02-17 11:00:00
10 2016-04-15 07:15:00
20 2016-06-10 10:30:00
Leistung_0011['Start_datetime'] = pd.to_datetime(Leistung_0011['ActStartDateExecution'].astype(str) + ' ' + Leistung_0011['ActStartTimeExecution'].astype(str))
ValueError: ('Unknown string format:', 'NaT 00:00:00')
【问题讨论】:
-
如果没有您的数据框示例 (
Leistung_0011),我们将无法为您提供帮助。您还应该包含完整的回溯。 -
请编辑您的问题以包含MCVE
-
你能发布你的数据吗?
-
是的,对不起,这是我在 stackoverflow 中的第一篇文章。
标签: python python-3.x pandas datetime