我正在使用pd.to_datetime()
withformat=
参数来加快处理速度,因为该函数不必推断每一行的格式。
然而,我的format=
论点不适用于 AM/PM:
pd.to_datetime('01/10/2017 10:15:17 PM',format = '%m/%d/%Y %H:%M:%S %p')
给出:
时间戳('2017-01-10 10:15:17')
时间应该是 22:15:17,因为原始时间有 'PM' 我的代码中是否存在错误或函数是否存在问题。