-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
DEPR: Remove df.reduction(level) #49611
Conversation
test_frame_consistency |
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, just a question on the old whatsnew.
.. code-block:: python | ||
|
||
s = pd.Series([False, True, False], index=[0, 0, 1]) | ||
s.any(level=0) | ||
>>> s = pd.Series([False, True, False], index=[0, 0, 1]) | ||
>>> s.any(level=0) | ||
0 True | ||
1 False | ||
dtype: bool |
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've been changing to .. code-block:: ipython
instead. I don't have any preference one way or the other, but wonder if maybe I should have been changing these to python code blocks.
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 don't have a preference either. I was mainly matching the other .. code-block:: python
s in this Other enhancements:
section for consistency.
I think if we fully tackle freezing whatsnews #6856 I would prefer the ipython version
# Previously compared to frame.op(level=...), but level removed in 2.0 | ||
# TODO: Assert something better | ||
assert isinstance(result, DataFrame) |
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'd be good with a tracking issue for this. I'd guess this test is largely redundant, but we might not be testing the combination of all these arguments at the same time anywhere else.
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.
Agreed. I'll create an issue and add the reference here.
* DEPR: Remove df.reduction(level) * test_*_consistency * Fix asv * Add issue ref
* DEPR: Remove df.reduction(level) * test_*_consistency * Fix asv * Add issue ref
Introduced in #40869