Closed
Description
All of these groupby operations take a function that can be a str
or a Callable
. They should ensure that:
- The
Callable
accepts a first parameter that is aDataFrame
orSeries
as applicable - The
Callable
returns the appropriate type - in some cases anIterable
, in other cases either aDataFrame
orSeries
- If a
str
is passed in, it is part of the set of supported functions, which are located here: https://github.com/pandas-dev/pandas/blob/main/pandas/core/groupby/base.py#L60 - If possible - and this may not be possible today - ensure that
args
andkwargs
parameters are type checked against the passed-inCallable
- Comprehensive set of tests are needed here, to exercise all variations
I'll start with transform
because that is a fairly simple API compared to the others and it is not very commonly used, so the potential impact of more narrow types there has a lower risk of an impactful regression.
Metadata
Metadata
Assignees
Labels
No labels