Skip to content

DEPR/ENH: support axis=None in min/max #45072

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

Merged
merged 9 commits into from
Dec 28, 2021

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx
  • tests added / passed
  • Ensure all linting tests pass, see here for how to run them
  • whatsnew entry

Deprecate the current axis=None behavior so we can change it in 2.0 xref #21597

@jreback jreback added Algos Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff Deprecate Functionality to remove in pandas labels Dec 27, 2021
@jreback jreback added this to the 1.4 milestone Dec 27, 2021
@jreback
Copy link
Contributor

jreback commented Dec 27, 2021

what is the status of the other functions here? (e.g. sum, mean etc) do these need to do the same?

@jbrockmendel
Copy link
Member Author

what is the status of the other functions here? (e.g. sum, mean etc) do these need to do the same?

the idea is to do the same for all of them, but it was less obvious how to implement it for the others. i guess if we're just doing the deprecation now, can deprecate them all at once.

@jreback
Copy link
Contributor

jreback commented Dec 27, 2021

kk yeah would want this for 1.4 but for all if possible (separate PRs are ok or all at once)

@jbrockmendel
Copy link
Member Author

separate PRs are ok or all at once

i'll try locally adding the deprecation for all of them and see if it Breaks The World. if not, will just add to this PR.

def max(self, axis=None, skipna=True, level=None, numeric_only=None, **kwargs):
def max(
self,
axis: int | None | lib.NoDefault = lib.no_default,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simonjayhawkins is this going to render in the docs in a way we don't want?

(similar question bugs me in a WIP branch that changes the default from method="pad" in .replace)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be a followup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Algos Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff Deprecate Functionality to remove in pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants