-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
DEP: Enforce set_values and set_codes inplace and positional args deprecation #49084
Conversation
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.
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.
minor items otherwise lgtm
@@ -254,12 +251,10 @@ def test_is_(): | |||
mi4 = mi3.view() | |||
|
|||
# GH 17464 - Remove duplicate MultiIndex levels | |||
with tm.assert_produces_warning(FutureWarning): | |||
mi4.set_levels([list(range(10)), list(range(10))], inplace=True) | |||
mi4 = mi4.set_levels([list(range(10)), list(range(10))]) |
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.
Similar comment - might be able to just remove
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 is a bit different, would like to keep it
@@ -145,7 +145,8 @@ Deprecations | |||
Removal of prior version deprecations/changes | |||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |||
- Disallow passing non-round floats to :class:`Timestamp` with ``unit="M"`` or ``unit="Y"`` (:issue:`47266`) | |||
- | |||
- Remove argument ``inplace`` from :meth:`MultiIndex.set_levels` and :meth:`MultiIndex.set_codes` (:issue:`35626`) | |||
- Disallow passing positional arguments to :meth:`MultiIndex.set_levels` and :meth:`MultiIndex.set_codes` (:issue:`41485`) |
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.
Could you add a test where set_levels
and set_codes
raises when passed positional args?
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.
Added
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.
lgtm @mroeschke merge when happy
Thanks @phofl |
…recation (pandas-dev#49084) * DEP: Enforce set_values and set_codes inplace and positional args deprecation * Fix * Add whatsnew * Add test
…recation (pandas-dev#49084) * DEP: Enforce set_values and set_codes inplace and positional args deprecation * Fix * Add whatsnew * Add test
#41485 #35626