-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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: Raise TypeError when subracting DateTimeArray and other date types #59901
Open
KevsterAmp
wants to merge
18
commits into
pandas-dev:main
Choose a base branch
from
KevsterAmp:better-msg-delta-series_timestamp
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+21
−9
Open
Changes from 13 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
99b1c3d
sync to master
KevsterAmp 55e6e47
Merge remote-tracking branch 'upstream/main'
KevsterAmp e5b75f0
Merge remote-tracking branch 'upstream/main' into better-msg-delta-se…
KevsterAmp 2e041b9
raise TypeError when "-" is used between DateTimeArray
KevsterAmp 11dd714
Merge remote-tracking branch 'upstream/main' into better-msg-delta-se…
KevsterAmp b9f41fb
Merge remote-tracking branch 'upstream/main' into better-msg-delta-se…
KevsterAmp 9f14a2a
remove pandas library and improve formatting
KevsterAmp 1df1edc
modify tests revolving this issue
KevsterAmp ca071a5
Merge remote-tracking branch 'upstream/main' into better-msg-delta-se…
KevsterAmp 5feb3a6
import outside top-level to handle DatetimeArray initialization
KevsterAmp 8f7430f
replace prev error msg to new implemented error msg
KevsterAmp 71a0c0f
replace prev error msg on test_timedelta64 with new error msg
KevsterAmp 1aba9a2
specify dtype since test func doesn't contain multiple params/loops
KevsterAmp 5b20b59
catch TypeError on DateTimeArrays specifically; Improve error message
KevsterAmp 17ace06
fix tests due to changed error message
KevsterAmp 25286eb
Merge remote-tracking branch 'upstream/main' into better-msg-delta-se…
KevsterAmp 23eb6c2
remove if statement to always raise the exception on TypeERror
KevsterAmp 341d085
Merge remote-tracking branch 'upstream/main' into better-msg-delta-se…
KevsterAmp 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 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 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 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.
I'm a little nervous enforcing a particular type out of a
rsub
operation.Could we just catch the
TypeError
and reraise it with a better message?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.
Gotcha, I agree that it would be a better implementation