Saturday, 2 February 2019

Converting UNIX timestamps into pandas datetime taking timezone into account

I would like to convert the following pandas series containing UNIX timestamps into a pandas datetime using either to_datetime() or arrow library in Python. I want to set the timezone to UTC and currently it is Europe/Paris

For Pandas I am using the following function, but not sure how to take the Europe\Paris timezone into account

pd.to_datetime(df['dates'], unit='s')



from Converting UNIX timestamps into pandas datetime taking timezone into account

No comments:

Post a Comment