-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: removed unused parameter 'out' from Series.idxmin/idxmax #12638
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
Conversation
Current coverage is
|
this is the same issue as being fixed in #12603. The underlying PR is almost there, so need to recast this similary. |
cc @gfyoung |
now that #12603 is merged, this should be quite trivial. |
@jreback one problem is that return argmin(axis, out) so it seems like we have two choices:
def idxmin(self, axis=None, out=None, skipna=True):
if out is not None:
raise ValueError(msg)
def idxmin(self, axis=None, *args, skipna=True):
validate_args(args, min_length=0, max_length=1) which would be better? |
@jreback : Is there any reason why we're supporting an @mortada : Your second option doesn't work because you can't put keywords after |
@mortada can you give a concrete example of where this actually fails now? we should hide the @gfyoung it makes the signatures the same for the same methods in Series/DataFrame. there is consistency across methods in pandas, that's why most are already in E.g. In fact these routines |
@jreback : By passing in arguments like this, |
Since this issue is localized to |
I would like to make the signture of |
@jreback : On the |
@gfyoung yeh something that that would work |
@gfyoung makes sense, I'll close this one, thanks! |
Augment pandas array-like methods with appropriate parameters (generally, '*args' and '**kwargs') so that they can be called via analogous functions in the numpy library they are defined in 'fromnumeric.py'. Closes pandas-devgh-12638. Closes pandas-devgh-12644. Closes pandas-devgh-12687.
Closes #12638 Closes #12644 Closes #12687 Author: gfyoung <[email protected]> Closes #12810 from gfyoung/fromnumeric-compat and squashes the following commits: 429bc51 [gfyoung] COMPAT: Expand compatibility with fromnumeric.py
git diff upstream/master | flake8 --diff
It seems misleading to have the
out
parameter in the function signature when it is not used:(unlike the
numpy.argmin/argmax
methods whereout
can be used)