我的数据框中有一列遵循此日期格式:
2016 年 5 月 17 日
我尝试遵循此参考:http ://strftime.org/ 和 pandas.to_datetime 参考:http ://pandas.pydata.org/pandas-docs/version/0.20/generated/pandas.to_datetime.html
我的代码如下:
df1 =df1.apply(pandas.to_datetime, errors='ignore', format='%d %b%Y')
我也试过了:format='%d/%b%Y'
format='%d /%b%Y'
还是不行。日期列类型仍然是对象。有任何想法吗?提前致谢