-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TST: Avoid DeprecationWarnings #22646
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
Conversation
Hello @jbrockmendel! Thanks for submitting the PR.
|
Codecov Report
@@ Coverage Diff @@
## master #22646 +/- ##
==========================================
+ Coverage 92.17% 92.17% +<.01%
==========================================
Files 169 169
Lines 50708 50715 +7
==========================================
+ Hits 46740 46747 +7
Misses 3968 3968
Continue to review full report at Codecov.
|
pandas/core/indexes/multi.py
Outdated
@@ -1551,6 +1551,10 @@ def __setstate__(self, state): | |||
|
|||
def __getitem__(self, key): | |||
if is_scalar(key): | |||
if lib.is_float(key) and key == int(key): | |||
# Avoid DeprecationWarning for non-integer number indexer |
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.
we do this a number of times in the indexing code
i think we have a function
maybe_convert_to_int_indexer iirc
if not can u make one
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.
Index._convert_scalar_indexer looks like a candidate; need to check where it is called.
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 take it back. core.common is right next to is_bool_indexer
is the place for this.
thanks! some more if you have a chance :> |
Avoid a boatload of these:
That last one was a nice little adventure tracking down to pd.util.testing.
Does not silence these, as I'm not confident that is The Right Thing To Do:
Does not silence these, as I'm not sure how: