In my csv file, I have date column as dd/mm/yyyy. However, when I import it into Python 3, it automatically changes the entire column to yyyy/mm/dd and its data type is an object.
I have tried converting it back to dd/mm/yyyy with this:
datetime.datetime.strptime(df_sales_sum['Date'], "%Y/%m/%d").datetime.strftime("%d-%m-%Y")
However, it returned me with this
TypeError: strptime() argument 1 must be str, not Series
Am i supposed to convert the df_sales_sum['Date']
part to a string first? And from what I know, datetime automatically converts it to yyyy/mm/dd. Correct me if im wrong.
Any help on converting it from yyyy/mm/dd
to dd/mm/yyyy
will be appreciated