def convert(s):
    s = s.split('.')[0]
return datetime.strptime(s, '%Y-%m-%d %H:%M:%S')
alerts = map(lambda x: dict(x, **{'alert_date': convert(x['alert_date'])}),
    alerts)
Python: Convert Dictionary of String Times to Date Times