我有这个数据框:
date value
1 Thu 17th Nov 2016 385.943800
2 Fri 18th Nov 2016 1074.160340
3 Sat 19th Nov 2016 2980.857860
4 Sun 20th Nov 2016 1919.723960
5 Mon 21st Nov 2016 884.279340
6 Tue 22nd Nov 2016 869.071070
7 Wed 23rd Nov 2016 760.289260
8 Thu 24th Nov 2016 2481.689270
9 Fri 25th Nov 2016 2745.990070
10 Sat 26th Nov 2016 2273.413250
11 Sun 27th Nov 2016 2630.414900
12 Mon 28th Nov 2016 817.322310
13 Tue 29th Nov 2016 1766.876030
14 Wed 30th Nov 2016 469.388420
我想将date
列的格式更改为此格式 YYYY-MM-DD 。数据框由200多行组成,每天都会添加新行,因此我需要找到一种自动执行此操作的方法。
This link没有帮助,因为它设置的日期类似dates = ['30th November 2009', '31st March 2010', '30th September 2010']
,我不能为每一行都这样做。有人知道解决这个问题的方法吗?