错误 Python:时间数据'Oct 22 2019 12:58:45:196AM'与格式不匹配'%b %d %Y %H:%M:%S:%f%p'(匹配)



我正在尝试对数据帧的一列进行日期计时。但我跳过了这个错误,我读了日期时间的文档,我不明白问题出在哪里

datetime.strptime('Oct 22 2019 12:58:45:196AM', '%b %d %Y %H:%M:%S:%f%p')
USE this one there is no need to any format
>>> from dateutil import parser
>>> s= '25 April, 2020, 2:50, pm, IST'
>>> parser.parse(s)
>>> datetime.datetime(2020, 4, 25, 14, 50)

最新更新