-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Timezones are not comparable between different pytz versions #7620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
when you are creating your current data you are not localizing (EST changed in pyt==2014.3 IIRC). e.g. |
I have two sets of data both localized to US/Eastern. One localized using pytz shipped with pandas 0.12 (saved to HDF5) and one localized using pytz shipped with pandas 0.14. Joining these loses all timezone information and converts to UTC. |
pytz is not shipped with pandas |
The pytz that was around when pandas 0.12 came out (you know what I mean). If I understand correctly, you are saying that I have to go through and manually localize all the HDF5 files I have to be localized to the most current EST definition? Or I can probably just use the old pytz and avoid this hassle? |
i would just use the same pytz. |
K. I think so too. I wouldn't mind putting up a note somewhere in the documentation that notifies people of this potential issue (normally not an issue with data on the fly, but an issue when dealing with stored data). |
sure that would be good. though these should be equivalent (they won't compare == but they should represent the same dates). |
Right, I guess that was my eventual point that they should be considered the same by pandas in some sense. Any thoughts on the iPython issue? It's more like 50 seconds than 20. |
no idea, do a %prun and post (and a reproducible exple if you can) |
Add some documentation on gotchas related to pytz updates #7620
I have HDF5 files created in 0.12 which were localized to a timezone ('US/Eastern'). When the dataframe is updated, it is done by calling combine_first which ultimately calls tseries.index.join. Now when I try to update in 0.14, the HDF5 representation changes. This is because of the different versions of pytz and timezone representation (see below), both sets of data will be converted to UTC and ultimately saved in UTC rather than US/Eastern. This certainly surprised me. This is using master branch as of this morning.
Also, in ipython typing "data.index.tz" gets stuck at "data.index." for about 20 seconds and my CPU spikes to 100% before completing. I don't know if this is simply related to the versions or something else.
The text was updated successfully, but these errors were encountered: