API: Inconsistent use of apply
arguments args and **kwargs
#47543
Labels
API Design
Apply
Apply, Aggregate, Transform, Map
Needs Discussion
Requires discussion from core team before further action
The signature of
Series.apply
(andDataFrame.apply
) seems inconsistent and cumbersome (seeargs
and**kwargs
:I'd expect to have
args
andkwargs
, or*args
and**kwargs
, not a mix of both. I assume this was implemented to allowconvert_dtype
to be passed as a positonal argument:But this seems confusing and not very intuitive:
To me, the API would be much clear if it was implemented as:
And I think this can be easily done in two steps, warning the user first without breaking code. If there is agreement, I'd also do the same for the rest of the methods using this same pattern.
The text was updated successfully, but these errors were encountered: