2016-11-15 57 views

回答

1

你需要unit='ms',也许replace,空字符串:

df = pd.DataFrame({'Timestamp':['1,475,761,269,562', '1,475,761,269,562']}) 
print (df) 
      Timestamp 
0 1,475,761,269,562 
1 1,475,761,269,562 

df["Timestamp"] = pd.to_datetime(df["Timestamp"].str.replace(',',''), unit = "ms") 
print (df) 
       Timestamp 
0 2016-10-06 13:41:09.562 
1 2016-10-06 13:41:09.562 
+0

解决 - 张贴问题后的20秒! – sudonym

相关问题