I wan't to change the format of a date column in pandas. In my example called df_transactions['date']
.
The format I am aiming for is format='%d-%m-%Y'
. However my code, doesn't seem to work.
This is the code I tried:
df_transactions['date'] = pd.to_datetime(df_transactions['date'], format='%d-%m-%Y')
Not sure if it's important information but I did a check on the datatype and it says: dtype: datetime64[ns, pytz.FixedOffset(60)
Any help is much appreciated.