this is my code.
data[‘Date’] = pd.to_datetime(data[‘Date’])
data.info()
getting this error:
time data “19-02-2010” doesn’t match format “%m-%d-%Y”, at position 2.
what changes I need to do or what line of code can be added.
how do i convert it in required format?
pls help
python datetime format tried strptime not working
I have tried datetime strpftime but no results still getting error
New contributor
Rupali Agarwal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.