I am a long time user of pandas, thank you for all your hard work.
Is your feature request related to a problem?
It would be useful to be able to do df.min(axis=None)
rather than df.values.min(axis=None)
to get the mimum over the whole DataFrame. The same goes for max
and so on. I expected this to work since this is how any
and all
work.
Describe the solution you'd like
I'd like the default argument for axis
to be 0
and then change the behaviour of None
to do both axes, like numpy does. This would be then be consistent with .all
and .any
.
Maybe changing behaviour of axis=None
would be an issue, if so, maybe this would require the less desirable axis="both"
.
API breaking implications
This would make the API more consitent, but would also be a breaking change.
Describe alternatives you've considered
Writing df.values.min(None)
.
Comment From: jbrockmendel
PR would be welcome.
Comment From: vyasr
@jbrockmendel I think this issue can be closed as a duplicate since the request is a subset of #21597.
Comment From: jbrockmendel
closing as duplicate of #21597.