Added test for #5091 (Missing Periods for some DateOffsets)#33195
Closed
gorogoroumaru wants to merge 6 commits into
Closed
Added test for #5091 (Missing Periods for some DateOffsets)#33195gorogoroumaru wants to merge 6 commits into
gorogoroumaru wants to merge 6 commits into
Conversation
mroeschke
reviewed
Apr 1, 2020
| # does .resample() set .freq correctly? | ||
| assert df.resample("D").asfreq().index.freq == "D" | ||
|
|
||
| def test_period_dateoffset_conversion(self): |
Member
There was a problem hiding this comment.
Could you put this test in pandas/tests/indexes/period/test_to_timestamp.py
mroeschke
reviewed
Apr 1, 2020
| assert df.resample("D").asfreq().index.freq == "D" | ||
|
|
||
| def test_period_dateoffset_conversion(self): | ||
| ts = pd.date_range('1/1/2012', periods=4, freq=pd.offsets.BQuarterEnd()) |
Member
There was a problem hiding this comment.
Can you add the issue number to this test? # GH 5091
mroeschke
reviewed
Apr 1, 2020
| per = ts.to_period() | ||
| ts_per = per.to_timestamp() | ||
|
|
||
| tm.assert_datetime_array_equal(ts, ts_per) |
Member
There was a problem hiding this comment.
Could use use tm.assert_index_equal and rename the variables so it reads tm.assert_index_equal(result, expected)
Member
|
Ah my mistake. When reviewing that issue I too hastily concluded that the issue was solved. Any interest in helping solving the bug? Otherwise, definitely recommend other issues that are tagged |
Author
|
Thank you, I will try another issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.