-
-
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: Fix tz-aware DatetimeIndex +/- TimedeltaIndex/timedelta64 array #18653
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's keep under 0.22
tdi = pd.timedelta_range('0 days', periods=10) | ||
expected = pd.date_range('2017-01-01', periods=10, tz=tz) | ||
|
||
result = dti + tdi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also test a reverse add
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
tdi = pd.timedelta_range('0 days', periods=10) | ||
expected = pd.date_range('2017-01-01', periods=10, tz=tz, freq='-1D') | ||
|
||
result = dti - tdi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test that the reverse ops raise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
1e5807e
to
cc6b19b
Compare
Codecov Report
@@ Coverage Diff @@
## master #18653 +/- ##
==========================================
- Coverage 91.59% 91.57% -0.02%
==========================================
Files 153 153
Lines 51221 51223 +2
==========================================
- Hits 46917 46909 -8
- Misses 4304 4314 +10
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #18653 +/- ##
==========================================
+ Coverage 91.57% 91.57% +<.01%
==========================================
Files 153 153
Lines 51210 51212 +2
==========================================
+ Hits 46894 46899 +5
+ Misses 4316 4313 -3
Continue to review full report at Codecov.
|
cc6b19b
to
2a665c0
Compare
thanks @jschendel very nice; keep em coming! |
git diff upstream/master -u -- "*.py" | flake8 --diff
Added the whatsnew entry under 0.22.0, but could possibly go under 0.21.1. This PR is a prereq for #18558.