I have a Pandas dataframe that i read from a excel file, this file is in spanish and has all the months in the date column as follows:
"11/ene/2021, 22/feb/, 04/mar/2021, 15/abr/2021, 13/may/2021, 16/jun/2021, 14/jul/2021, ...."
I.e., every month is a string of 3 characters, followed by the year and with the day at first position of the format, d/m/y
.
As it is in Spanish I can't parse with datetime, so i think i could search with regex the month and replace with a value stored in a dictionary equivalent to month number.
The regex i think could works is:
r'\d+\/[a-z]{3}\/\d+'
Is there any way to do that in Pandas?