-
- Notifications
You must be signed in to change notification settings - Fork 19.2k
BUG: Fix some PeriodIndex resampling issues #16153
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
Merged
jreback merged 20 commits into pandas-dev:master from winklerand:fix-some-PeriodIndex-resampling-issues Oct 1, 2017
Merged
Changes from 1 commit
Commits
Show all changes
20 commits Select commit Hold shift + click to select a range
ca7b6f2 CLN: move PeriodIndex binning code to TimeGrouper
winklerand c27f430 TST/CLN: raise error when resampling with on= or level= selection
winklerand 390e16e BUG: resampling PeriodIndex now returns PeriodIndex (GH 12884, 15944)
winklerand 23566c2 BUG: OHLC-upsampling of PeriodIndex now returns DataFrame (GH 13083)
winklerand a82879d BUG: enable resampling with NaT in PeriodIndex (GH 13224)
winklerand 4b1c740 CLN: remove warning on falling back to tstamp resampling with loffset
winklerand 73c0990 CLN: use memb._isnan for NaT masking
winklerand fa6c1d3 DOC: added issue reference for OHLC resampling
winklerand 7ea04e9 STYLE: added blank lines
winklerand 82a8275 TST: convert to parametrized tests / pytest idiom
winklerand 432c623 CLN/TST: call assert_almost_equal() when comparing Series/DataFrames
winklerand c8814fb STYLE: added blank lines, removed odd whitespace, fixed typo
winklerand 486ad67 TST: add test case for multiple consecutive NaTs in PeriodIndex
winklerand ad8519f TST/DOC: added issue number to test case
winklerand 39fc7e2 TST: consolidate test_asfreq_downsample, test_asfreq_upsample -> test…
winklerand efcad5b TST: set fixtures to default function scoping
winklerand 41401d4 TST: convert constant 'setup-like' values/objects to pytest fixtures
winklerand 398a684 DOC: whatsnew v0.21.0 entry (in API changes section)
winklerand 8358c41 fixups
jreback 6084e0c moar whatsnew
jreback File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
TST/CLN: raise error when resampling with on= or level= selection
Added tests to cover all code paths, moved the check to _convert_obj() and removed then-redundant check from _upsample() method.
- Loading branch information
commit c27f43048ba0c7ae7d1f0c4947d5ac253f28f628
There are no files selected for viewing
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
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
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.
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.
these tests are more clear with parametrize
but we still inherit from TestCase so can't change this
but you can start a new test class that does this
again if it's more clear
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.
not sure if I understood correctly - pushed 48e324f as an example, are you thinking along those lines of using pytest fixtures/mark.parametrize decorators?
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.
commented directly on the commit