-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
API: add level kwarg for Series.any/.all #8302
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
Comments
Hi, I'd like to take a crack at this one. |
It looks like most aggregation functions are implemented in NDFrame and accept standardized arguments. All and any, however, are implemented separately in Series (via IndexOpsMixin) and DataFrame. The Series implementations forward to the corresponding numpy implementations, and so accept a different set of arguments. Currently most of the aggregation functions accept something like: While any/all accept: The request in this ticket is for any/all to accept the level argument. It seems like we might want to implement any/all the same way the other aggregation functions are implemented in NDFrame rather than as thin wrappers around the numpy implementations. Would it make sense to:
|
@staple
|
I'm also not sure if |
I noticed that in DataFrame's any / all, there is an implementation for parameters Additionally, we can continue to support Series' existing special arguments from ndarray.any/all via kwargs, which will allow named arguments to be handled the way they were before. But unnamed arguments, for example, |
ok, start by moving Then, in so this definitely needs cleanup as was never done originally. |
Hi, please see my PR #8550 |
It appears that Series'
s.any
ands.all
methods miss level kwargs, unlike their statistical counterparts likes.sum
:Frames have those and I think so should series. Maybe, there are more reduction methods that I know not of that also miss those...
The text was updated successfully, but these errors were encountered: