I am trying to convert string to datetime. The string syntax is 30JUN21.
Code:
df.column = pd.to_datetime(df.column, , format='%d%^b%y')
Error:
ValueError: '%' is a bad directive in format '%d%^b%y'
I am pretty sure this error relates to the caret. I don't know another way around the upper case month abbreviations.
See https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior.