0

I have a dataframe with date columns that are in this initial format:

2018-04-30T22:43:36-04:00

I am using df[['col]].apply(pd.to_datetime) to convert them, however the conversion automatically adds +4 hours because of the timezone part. Is there any way to ignore that and convert the column to datetime without changing the timezone?

Thanks

DBa
  • 261
  • 1
  • 3
  • 11
  • There might be a better way, but what about `pd.to_datetime(col.str[:-6])` – user3483203 Jun 08 '18 at 14:42
  • We can manipulate the string to ignore the timezone. Other then that, it seems like an open issue: https://github.com/pandas-dev/pandas/issues/13712 – harvpan Jun 08 '18 at 14:51

0 Answers0