A python dataframe 'dff' containing data imported from SAS is having a date field whose type is showing as below by python:
dff.effvdate.head()
Out[47]:
0 b'09JUL2013'
1 b'17OCT2013'
2 b'03MAR2014'
3 b'08MAY2014'
4 b'10MAR2015'
Name: effvdate, dtype: object
I am trying to convert this date to datetype as below:
dff['REPORT_MONTH'] =[dt.datetime.strptime(d,"%d%b%Y").date() for d in dff['effvdate']]
showing this error
TypeError: strptime() argument 1 must be str, not bytes
As i am new to python, need help on this.