Reputation: 255
I have a dataframe like below:
Car id time
car_41 2019-10-09 19:21:06
. .
The time type is datetime64[ns] and it's based on GMT; however, I want to convert it to AEST (Australian Eastern Standard Time) but I'm not sure how can I do it. any suggestions would be really appreciated.
Upvotes: 0
Views: 510
Reputation: 11650
here is one way to do it
pd.to_datetime(df['time'], utc=True ).dt.tz_convert('Australia/ACT')
0 2019-10-10 06:21:06+11:00
Name: time, dtype: datetime64[ns, Australia/ACT]
Upvotes: 0