-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Deprecate passing args as positional in DataFrame/Series.clip #41511
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
Deprecate passing args as positional in DataFrame/Series.clip #41511
Conversation
cd733ac
to
a40bad1
Compare
a40bad1
to
0345df0
Compare
df = DataFrame({"a": [1, 2, 3]}) | ||
msg = ( | ||
r"Starting with Pandas version 2\.0 all arguments of clip except " | ||
r"for the arguments 'self', 'lower' and 'upper' will be keyword-only" |
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 think deprecate_nonkeyword_arguments should be updated first to give a clearer message for methods (i.e. not mention self and maybe also mention the class)
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.
yeah, agreed, I'll make a PR to update that first
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.
ping on that PR :->
b4ad229
to
37faa10
Compare
can you rebase |
e14c5dd
to
b4dec9e
Compare
a81e7b4
to
a6d64d1
Compare
@MarcoGorelli it looks like deprecate_nonkeyword_arguments is not preserving the type annotations. maybe should fix before too many of these deprecations are merged. |
Hey @simonjayhawkins - unfortunately, I don't think that's possible. I think we need to choose between:
and I'd like to make the case that the third one is the least undesirable |
not tried but cannot do |
I'll try again, hopefully I spoke prematurely |
Indeed - #41608 - thanks for having pushed me on this 🙏 |
…lli/pandas into deprecate-nonkeyword-args-clip
inplace
#41485