-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
BUG: resample with tz-aware: Values falls after last bin #15549
Comments
I can create a pull request with the change I described if it looks ok |
ahcub
added a commit
to ahcub/pandas
that referenced
this issue
Mar 2, 2017
4 tasks
This was referenced Nov 17, 2017
4 tasks
jreback
pushed a commit
that referenced
this issue
Nov 21, 2017
TomAugspurger
pushed a commit
to TomAugspurger/pandas
that referenced
this issue
Dec 8, 2017
…andas-dev#15549 (pandas-dev#18337) (cherry picked from commit 8efd1a0)
TomAugspurger
pushed a commit
that referenced
this issue
Dec 11, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code Sample, a copy-pastable example if possible
Problem description
resampling is not handling non-UTC index properly due to daylight saving time change
and the problem occurs in file https://github.com/pandas-dev/pandas/blob/master/pandas/tseries/resample.py
function:
_get_time_bins
code:
binner = labels = DatetimeIndex(freq=self.freq,...
this problem can be solved by converting ax tz to UTC before the resampling and applying the original tz after DatetimeIndex is created
so the code will look like this
this cause the bins to be always aligned by UTC times rather than original tz, but I think that it is adequate behaviour as well.
Expected Output
I expect the resampling to be successful regardless of the time range selected
Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: