-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
searchsorted, repeat broken off from #24024 #24461
Conversation
Codecov Report
@@ Coverage Diff @@
## master #24461 +/- ##
==========================================
+ Coverage 92.31% 92.31% +<.01%
==========================================
Files 165 165
Lines 52194 52252 +58
==========================================
+ Hits 48182 48237 +55
- Misses 4012 4015 +3
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #24461 +/- ##
===========================================
- Coverage 92.3% 42.99% -49.31%
===========================================
Files 163 163
Lines 51969 52028 +59
===========================================
- Hits 47968 22372 -25596
- Misses 4001 29656 +25655
Continue to review full report at Codecov.
|
updated per comments |
pandas/core/arrays/datetimelike.py
Outdated
# These are not part of the EA API, but we implement them because | ||
# pandas assumes they're there. | ||
|
||
def searchsorted(self, v, side='left', sorter=None): |
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.
Just to be clear, the name for the positional argument hasn't been finalized yet. We're figuring out the relative value of matching NumPy vs. matching the rest of pandas here.
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.
well, as I have said multiple times, we are already using value
in pandas, so -1 unless its that.
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.
Apparently Jeff has decided :)
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.
Will revert
pandas/core/arrays/datetimelike.py
Outdated
|
||
def _check_compatible_with(self, other): | ||
# type: (Union[Period, Timestamp, Timedelta, NaTType]) -> None | ||
# TODO: Scalar, array, or both? |
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 TODO can be removed I think. We've finalized the type IMO.
But that can be done on merge if we don't have any other commits to push.
merging this and closing #24350 ? |
#24350 implements it for ExtensionArray. This does it for datetimelike, so both will be needed I think. |
okie dokie; this needs a merge master |
rebased |
merged #24350 but looks like this is clean. ping on green. |
Ping |
thanks @jbrockmendel |
Along with fixes for check_compatible_with discussed in #24024, and additional tests for
searchsorted
and_check_compatible_with