ENH: axis=None
option for statistical methods: .min
, .max
, .median
, and so on
#43889
Labels
API Design
Enhancement
Needs Discussion
Requires discussion from core team before further action
Reduction Operations
sum, mean, min, max, etc.
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 thandf.values.min(axis=None)
to get the mimum over the whole DataFrame. The same goes formax
and so on. I expected this to work since this is howany
andall
work.Describe the solution you'd like
I'd like the default argument for
axis
to be0
and then change the behaviour ofNone
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 desirableaxis="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)
.The text was updated successfully, but these errors were encountered: