Skip to content
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

Merged
merged 6 commits into from
Nov 11, 2022

Conversation

mroeschke
Copy link
Member

Introduced in #40869

@mroeschke mroeschke added the Deprecate Functionality to remove in pandas label Nov 10, 2022
@jbrockmendel
Copy link
Member

test_frame_consistency

@mroeschke mroeschke added this to the 2.0 milestone Nov 10, 2022
Copy link
Member

@rhshadrach rhshadrach left a 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.

Comment on lines +157 to +163
.. 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
Copy link
Member

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.

Copy link
Member Author

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:: pythons in this Other enhancements: section for consistency.

I think if we fully tackle freezing whatsnews #6856 I would prefer the ipython version

Comment on lines 92 to 94
# Previously compared to frame.op(level=...), but level removed in 2.0
# TODO: Assert something better
assert isinstance(result, DataFrame)
Copy link
Member

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.

Copy link
Member Author

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.

@mroeschke mroeschke merged commit dbb2adc into pandas-dev:main Nov 11, 2022
@mroeschke mroeschke deleted the depr/rm/level_in_aggs branch November 11, 2022 17:48
codamuse pushed a commit to codamuse/pandas that referenced this pull request Nov 12, 2022
* DEPR: Remove df.reduction(level)

* test_*_consistency

* Fix asv

* Add issue ref
mliu08 pushed a commit to mliu08/pandas that referenced this pull request Nov 27, 2022
* DEPR: Remove df.reduction(level)

* test_*_consistency

* Fix asv

* Add issue ref
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants