I have 180,000 rows of timestamps which I would like to parse into a datetime format like:
YYYY-MM-DD HH:MM:SS
Below are the timestamps (note lack of leading zeros in first 9 hours):
19-May-14 3:36:00 PM PDT
19-May-14 10:37:00 PM PDT
I have been parsing these dates using parse_dates
as part of pandas.read
, but I have been finding this method slow (~80 seconds typically). I have also tried the dateutil
parser with similar results.
I would like to parse the timestamps faster, but I am having trouble with the varying widths in the timestamps. I found this SO solution which seems quite similar to my problem, but failed to adapt the method to timestamps of varying length.
Could someone recommend a feasible adaptation to the linked solution, or another better method?
Thank you