I have to turn dates into words into dates into numbers
21-MARZO-2017
09-FEBRERO-2017
16-MAYO-2017
Which should look like this
21-03-2017
09-02-2017
16-05-2017
I tried to make an fix with the months and then compare them and replace them with the month by index of the array
x = "21-MARZO-2017"
meses = ['enero','febrero','marzo','abril','mayo','junio','julio','agosto','septiembre','noviembre','diciembre']
for i in meses
if meses not in x
x = x.replace("MARZO", "index[meses]")
print x