-
-
Notifications
You must be signed in to change notification settings - Fork 19.1k
DEPR: non-keyword arguments in any #44896
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 27 commits
59bd617
389cb03
076efc0
7f643d6
d6df993
d2653da
0f15b62
831481c
284efd3
e002897
912b040
b229a3b
0c3ebd7
799e12b
3441523
cdb96f7
49a1b0b
76003ed
787616d
0375347
5573d34
a13ee6f
6e5b3ac
63ae9c1
1010e1e
424b213
8007cf1
a361637
ea19d40
2678298
96de045
86ad6ba
7dec331
b4b3a1f
11917aa
35c71b6
0e6d5eb
025c493
59ac830
d9d14e9
15bbc86
a8dd741
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 |
---|---|---|
|
@@ -722,6 +722,7 @@ Other Deprecations | |
- Deprecated :meth:`DateOffset.apply`, use ``offset + other`` instead (:issue:`44522`) | ||
- Deprecated parameter ``names`` in :meth:`Index.copy` (:issue:`44916`) | ||
- A deprecation warning is now shown for :meth:`DataFrame.to_latex` indicating the arguments signature may change and emulate more the arguments to :meth:`.Styler.to_latex` in future versions (:issue:`44411`) | ||
- Deprecated passing arguments as positional in :meth:`DataFrame.any` and :meth:`Series.any` (:issue:`44802`) | ||
|
||
- Deprecated behavior of :func:`concat` between objects with bool-dtype and numeric-dtypes; in a future version these will cast to object dtype instead of coercing bools to numeric values (:issue:`39817`) | ||
- Deprecated :meth:`Categorical.replace`, use :meth:`Series.replace` instead (:issue:`44929`) | ||
- Deprecated passing ``set`` or ``dict`` as indexer for :meth:`DataFrame.loc.__setitem__`, :meth:`DataFrame.loc.__getitem__`, :meth:`Series.loc.__setitem__`, :meth:`Series.loc.__getitem__`, :meth:`DataFrame.__getitem__`, :meth:`Series.__getitem__` and :meth:`Series.__setitem__` (:issue:`42825`) | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -10517,7 +10517,7 @@ def any( | |||||||||||||||||||||||||||||||||||||||||||||||||
skipna: bool_t = True, | ||||||||||||||||||||||||||||||||||||||||||||||||||
level: Level | None = None, | ||||||||||||||||||||||||||||||||||||||||||||||||||
**kwargs, | ||||||||||||||||||||||||||||||||||||||||||||||||||
) -> Series | bool_t: | ||||||||||||||||||||||||||||||||||||||||||||||||||
) -> DataFrame | Series | bool_t: | ||||||||||||||||||||||||||||||||||||||||||||||||||
return self._logical_func( | ||||||||||||||||||||||||||||||||||||||||||||||||||
"any", nanops.nanany, axis, bool_only, skipna, level, **kwargs | ||||||||||||||||||||||||||||||||||||||||||||||||||
) | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
@@ -10932,6 +10932,12 @@ def _add_numeric_operations(cls): | |||||||||||||||||||||||||||||||||||||||||||||||||
""" | ||||||||||||||||||||||||||||||||||||||||||||||||||
axis_descr, name1, name2 = _doc_params(cls) | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
@deprecate_nonkeyword_arguments( | ||||||||||||||||||||||||||||||||||||||||||||||||||
version=None, | ||||||||||||||||||||||||||||||||||||||||||||||||||
allowed_args=["self"], | ||||||||||||||||||||||||||||||||||||||||||||||||||
stacklevel=find_stack_level() - 1, | ||||||||||||||||||||||||||||||||||||||||||||||||||
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. removing the stacklevel from args in decorator (default value of 2) also works here 🤔 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. its not correct to evaluate this at compile time. what should happen is that the deprecater can call 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. @jreback I don't understand what you mean, how should this be? Just setting Lines 10928 to 10948 in 073b353
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. i mean this needs to be handled in the decorator itself not here. 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. It's done in the decorator in other places though pandas/pandas/io/parsers/readers.py Lines 831 to 833 in e1b95fa
I've made an issue to handle this in the decorator itself #46687 , is it OK to keep that separate from this PR? 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. ok i c, yeah we out to fix this but ok for here |
||||||||||||||||||||||||||||||||||||||||||||||||||
name="DataFrame.any and Series.any", | ||||||||||||||||||||||||||||||||||||||||||||||||||
) | ||||||||||||||||||||||||||||||||||||||||||||||||||
@doc( | ||||||||||||||||||||||||||||||||||||||||||||||||||
_bool_doc, | ||||||||||||||||||||||||||||||||||||||||||||||||||
desc=_any_desc, | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Uh oh!
There was an error while loading. Please reload this page.