I have a dataframe that contains a column in date values in string mode. I want to convert it to a datetime but I can't do it at all.
I have first tried to get the datetime function to autodetect it, but it can't. I have also tried to do it manually but I did not reach the solution either. The date format is '1 Ago 2020', the month is in Spanish format and at the same time, as you can see, it does not contain the double 0 in the days until 9.
I have used different codes but here I show an example of some.
import pandas as pd
import datetime
dfweight = pd.read_csv('data_weight.csv')
pd.to_datetime(dfweight['Fecha'], format='%d %b, %Y')
Where he threw: ValueError: time data ' 12 May 2020' does not match format '%d %b, %Y' (match)
I also tried adding # (% # d) so it doesn't show 0 through 9 as I read in some comments but it shows the following error.
ValueError: '#' is a bad directive in format '% # d% b,% Y'
If someone can help me I thank you in advance because I am blocked. Thanks in advance