我正在用python工作,我正在加载一个文件并将其保存在一个如下所示的数据帧中。你知道吗
27 9-7-2019 30.029 MOROSO MOVIL NO 30029
28 9-7-2019 40.575 MOROSO MOVIL NO 40575
29 9-7-2019 31.929 MOROSO MOVIL NO 31929
30 9-7-2019 133.53 MOROSO MOVIL NO 133530
31 9-7-2019 62.426 MOROSO MOVIL NO 62426
.. ... ... ... ... ... ...
476 9/7/2019 34.397 MOROSO MOVIL NO 34397
477 9/7/2019 89.827 MOROSO MOVIL NO 89827
478 9/7/2019 37.973 MOROSO MOVIL NO 37973
479 9/7/2019 29.98 MOROSO MOVIL NO 29980
480 9/7/2019 25.992 MOROSO MOVIL NO 25992
问题是在第二列中,日期有不同的格式,dd-mm-yyyy
和dd/mm/yyyy
,我需要它将其转换为datetime。你知道吗
我试过做转换,但是这个转换是用dd/mm/yyyy
格式转换为NaT日期的
我怎样才能解决这个问题?你知道吗
用途:
输出:
让熊猫猜猜看:
输出:
相关问题 更多 >
编程相关推荐