Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
ENH: bad directive in to_datetime format - this uses std. strptime zone offset #13486
this is really bad for me since almost all linux logfiles contain zone offset.
As far as I can see there is not workaround without parsing the timestamp twice.
Code Sample, a copy-pastable example if possible
parse common Apache access log timestamp
should parse timestamps with zone offset
Two possible workarounds (without parsing the date in two parts, the offset separately):
Both methods you could apply on the values in your datetime column. But that will not necessarily be faster than parsing the timezone offset separately (if performance is a bottleneck)
@jorisvandenbossche thanks for the great advice! Obviously the python 2 docu is wrong since %z is actually not supported. I learned a lot! At least for now I go with the dateutil workaround.