-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DEPR: Remove unnecessary kwargs in groupby ops #50483
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
Changes from 8 commits
7ebf822
88ab270
aff453d
4f6548b
2a680be
6569006
3a150f6
519d9da
20c8606
b026a74
dfed625
1676d19
b3ca2f2
90fb8dc
fe8f551
e45c8ff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,7 @@ | |
from pandas.util._decorators import ( | ||
Appender, | ||
Substitution, | ||
deprecate_nonkeyword_arguments, | ||
doc, | ||
) | ||
|
||
|
@@ -893,6 +894,9 @@ def fillna( | |
return result | ||
|
||
@doc(Series.take.__doc__) | ||
@deprecate_nonkeyword_arguments( | ||
version="3.0", allowed_args=["self", "axis", "indices"] | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Having another look, looks like |
||
def take( | ||
self, | ||
indices: TakeIndexer, | ||
|
@@ -903,6 +907,9 @@ def take( | |
return result | ||
|
||
@doc(Series.skew.__doc__) | ||
@deprecate_nonkeyword_arguments( | ||
version="3.0", allowed_args=["self", "axis", "skipna", "numeric_only"] | ||
) | ||
def skew( | ||
self, | ||
axis: Axis | lib.NoDefault = lib.no_default, | ||
|
@@ -911,11 +918,7 @@ def skew( | |
**kwargs, | ||
) -> Series: | ||
result = self._op_via_apply( | ||
"skew", | ||
axis=axis, | ||
skipna=skipna, | ||
numeric_only=numeric_only, | ||
**kwargs, | ||
"skew", axis=axis, skipna=skipna, numeric_only=numeric_only, **kwargs | ||
) | ||
return result | ||
|
||
|
@@ -2272,16 +2275,17 @@ def fillna( | |
return result | ||
|
||
@doc(DataFrame.take.__doc__) | ||
def take( | ||
self, | ||
indices: TakeIndexer, | ||
axis: Axis | None = 0, | ||
**kwargs, | ||
) -> DataFrame: | ||
@deprecate_nonkeyword_arguments( | ||
version="3.0", allowed_args=["self", "indices", "axis"] | ||
) | ||
def take(self, indices: TakeIndexer, axis: Axis | None = 0, **kwargs) -> DataFrame: | ||
result = self._op_via_apply("take", indices=indices, axis=axis, **kwargs) | ||
return result | ||
|
||
@doc(DataFrame.skew.__doc__) | ||
@deprecate_nonkeyword_arguments( | ||
version="3.0", allowed_args=["self", "axis", "skipna", "numeric_only"] | ||
) | ||
def skew( | ||
self, | ||
axis: Axis | None | lib.NoDefault = lib.no_default, | ||
|
@@ -2290,11 +2294,7 @@ def skew( | |
**kwargs, | ||
) -> DataFrame: | ||
result = self._op_via_apply( | ||
"skew", | ||
axis=axis, | ||
skipna=skipna, | ||
numeric_only=numeric_only, | ||
**kwargs, | ||
"skew", axis=axis, skipna=skipna, numeric_only=numeric_only, **kwargs | ||
) | ||
return result | ||
|
||
|
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 currently in the section of deprecations that we are enforcing for 2.0. Instead, it should be in the new deprecations that are introduced in 2.0. That's one section up from this.
Can you add "unused" before "argument" to indicate to users we're not removing any functionality.
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.
yes surely i'll do the changes