熊猫to_datetime无法将非零填充字符串转换为datetime

时间:2019-01-24 17:15:33

标签: python-3.x pandas strftime string-to-datetime

我试图将以下一系列字符串vec = c(81,43,31,20,10,5,1,0) myColors = c("red", "blue") myRangeFunction = colorRampPalette(myColors) myColorRange = myRangeFunction(max(vec)) myColors = myColorRange[vec] plot(x = seq_along(vec), y = vec, cex = 2, pch = 19, col = myColors) 转换为日期时间,

rollsAtMax

我想知道如何将它们隐藏起来

s

1 个答案:

答案 0 :(得分:1)

IIUC

pd.to_datetime(df,format='%m%d%y')
Out[210]: 
0   2018-12-01
1   2018-12-02
2   2018-11-03
3   2018-10-04
Name: x, dtype: datetime64[ns]
相关问题