Below is my data frame -
date name
18-Sep-18 bb
6-Aug-18 vv
Kingdom on 2 January 2019 cc
Kingdom on 9 June 2021 aa
States on 10 September 2021 bb
States on 14 April 2021 mm
I want my data frame -
date name
2018-09-18 bb
2018-08-06 vv
2019-01-02 cc
2021-06-09 aa
2021-09-10 bb
2021-04-14 mm
I have done the following code -
df['date'] = pd.to_datetime(df['date']).dt.strftime('%m/%d/%Y')
But it's not working