COMPAT: Add keepdims and friends to validation by TomAugspurger · Pull Request #24356 · pandas-dev/pandas (original) (raw)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that would make sense, but it isn't really written that way right now. Right now we just have instances of CompatValidator sitting in function.py
, and we choose the right one to call.
It'd be nice to have a decorator that did it for us
@validate_numpy def mean(self, ...): ...
then we don't have the duplication of the function name. But I think that's a decent sized refactor of how things are done now.