-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: date_range
inclusive
parameter behavior doesn't match interval notation
#55319
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
Closed
PiotrekB416
wants to merge
22
commits into
pandas-dev:main
from
PiotrekB416:FIX-date_range-inclusive
Closed
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
c054c3d
FIX `date_range` inclusive
PiotrekB416 3bc308b
Merge branch 'pandas-dev:main' into FIX-date_range-inclusive
PiotrekB416 5aa1ca5
FIX tests
PiotrekB416 0137349
Update datetimes.py
PiotrekB416 1edced5
Update test_date_range.py
PiotrekB416 a2d8ae6
Update test_date_range.py
PiotrekB416 048e00f
Fixed random paste
PiotrekB416 bf5cfe1
Merge branch 'main' into FIX-date_range-inclusive
PiotrekB416 f20d078
Merge branch 'main' into FIX-date_range-inclusive
PiotrekB416 09d5b94
Update whatsnew
PiotrekB416 dcb4707
Merge branch 'main' into FIX-date_range-inclusive
PiotrekB416 a3f2097
Merge branch 'main' into FIX-date_range-inclusive
PiotrekB416 23ef653
Merge branch 'main' into FIX-date_range-inclusive
PiotrekB416 fed521d
Minor refactoring in tests
PiotrekB416 2cfea14
Merge branch 'main' into FIX-date_range-inclusive
PiotrekB416 06cdc3c
merge main into branch
PiotrekB416 dc339f4
Update Dockerfile
PiotrekB416 24856e7
Update .devcontainer.json
PiotrekB416 a2bcae5
Update test_date_range.py
PiotrekB416 584dc2f
fix formatting
PiotrekB416 94f8039
fixed Y is deprected use YE instead
PiotrekB416 476ced9
Merge branch 'pandas-dev:main' into FIX-date_range-inclusive
PiotrekB416 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
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
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.
why is this part of the test comment out?
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 shortest answer would be that those lines are not needed and can be safely deleted. I just commented them out when I was testing and then forgot to remove them.
And as for why they were there in the first place. They were used by
_get_expected_range
, but they are not needed for the function to workThere 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.
ok thanks - if they're not needed, then to simplify reviews, could you please first open a precursor PR in which you remove anything that's not needed, and then we keep this PR focused on the logic changes (+ relevant tests)? thanks 🙏
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.
I'm afraid that might not be possible. The code is complicated because of its logic errors, thus I can't simplify it without making logic changes.
For example:
in
test_range_closed_boundary
this simplification doesn't work if there are no logic changes in the
_generate_range
function, because then the expected values are compared to incorrectly generated ranges.