Very simple question but I can't seem to find an answer. The date format in my CSV is in mm/dd/yyyy format specifically 1/16/1962 but i am trying to get it to change to a display of dd/mm/yyyy . But when i try to use pd.to_datetime... specifically
df.index = pd.to_datetime(df.index, format="%d-%m-%Y")
it says
ValueError: time data '1/16/1962' does not match format '%d-%m-%Y' (match)
I tried a number of ways including putting dayfirst = True into the bracket but it seems nothing works