I've got 2 questions:
- How can I convert a Spanish datetime 'ago122010' into 2010-08-12 using pandas. Is the format used in strptime correct?
I've tried the following:
import locale
locale.setlocale(locale.LC_ALL, 'es_ES.utf8')
from datetime import datetime as dt
df['date'] = dt.strptime(df['date'], '%b%d%Y')
df['date'] = df['date'].strftime('%Y-%m-%d')
but I'm getting the following error:
Error: unsupported locale setting
- how can I convert this '20100812' to a datetime using pandas.