ban*_*ana 5 python timestamp pandas
我的数据框中有一列事件的时间戳,看起来像"2016-06-10 18:58:25:675",最后3位数是毫秒,有没有一种有效的方法将此列转换为Pandas数据时类型?
当我尝试:
pd.to_datetime('2016-06-10 18:57:35:317')
Run Code Online (Sandbox Code Playgroud)
发生错误,说"未知的字符串格式".
mgi*_*ert 13
这样的事情应该有效
pd.to_datetime('2016-06-10 18:57:35:317', format="%Y-%m-%d %H:%M:%S:%f")
Run Code Online (Sandbox Code Playgroud)
您可以在此处查找日期时间格式