-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Fix+test timezone-preservation in DTA.repeat #24483
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
Changes from 2 commits
6b01b7d
a965519
08eb921
8aa3637
4741f2d
2a7a5f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,3 +90,10 @@ def test_setitem_clears_freq(self): | |
tz='US/Central')) | ||
a[0] = pd.Timestamp("2000", tz="US/Central") | ||
assert a.freq is None | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this near other repeat tests There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are no other repeat tests AFAICT; I think those are in the tests.extension part of 24024 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. right, i meant repeat tests for DTA/TDA/PA. There are more coming up in the tests.extension part of 24024. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, i guess that 's fine. need a followup then to consolidate DTI/DTA test for common methods at some point then. |
||
def test_repeat_preserves_tz(self): | ||
dti = pd.date_range('2000', periods=2, freq='D', tz='US/Central') | ||
arr = DatetimeArray(dti) | ||
|
||
repeated = arr.repeat([1, 1]) | ||
tm.assert_equal(arr, repeated) |
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.
this is only for tz aware right?
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.
the example in 24265 was tz-naive