enter image description here
I tried to convert a date(August 4, 2017) to a datetime format(2017-08-04) by adding a column named ‘computer_date’ from the column ‘date_added’ using pandas, while I was doing this an error occured saying: ‘ time data ” August 4, 2017″ doesn’t match format “%B %d, %Y” ‘
netflix["computer_date"] = pd.to_datetime(netflix["date_added"])
netflix
pd = pandas
netflix- Dataframe
computer_date- column
date_added- column
I was expecting to get the column ‘computer_date’ added to the dataframe netflix like the image below.
enter image description here
Beruu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.