Error while converting string to date time using datetime.strptime()
%m is the month 01 through 12.  %b would match your date of "DEC" (note, %b depends on locale).
pickle["CSE_TS_SAMPLING"].head(2)
output:
0    02-DEC-2020 20:16:09
1    03-DEC-2020 03:43:33
Name: CSE_TS_SAMPLING, dtype: object
from datetime import datetime
def convert_date(x):
return datetime.strptime(x, "%d-%m-%Y %H:%M:%S")
pickle["sample_date"]=pickle["CSE_TS_SAMPLING"].apply(lambda x:convert_date(x))
error:
time data '02-DEC-2020 20:16:09' does not match format '%d-%m-%Y %H:%M:%S'