--

Opa. Valeu.
Para passar data em português tipo 07 de junho de 2015, vc vai ter que transformar o mês em três letras inglês (tipo Jan, feb, mar, apr, Jun…). A data_string ficaria “07 de jun de 2015”.
Depois usa o datetime pra converter.

import datetime as dt
dt.datetime.strptime(data_string, “%d de %b de %Y”)

--

--

Gustavo R Santos
Gustavo R Santos

Written by Gustavo R Santos

Data Scientist | I solve business challenges through the power of data. | Visit my site: https://gustavorsantos.me

No responses yet