Create a property function to decide what to do for EAs in _ea_wrap_cython_operation
for groupby ops.
xref : https://github.com/pandas-dev/pandas/pull/43634#discussion_r712140219
https://github.com/pandas-dev/pandas/blob/439acc99b2968ec8062eee05af7346acea20915b/pandas/core/groupby/ops.py#L318-L333
Comment From: jbrockmendel
I'm increasingly thinking that doing this right will mean implementing the relevant operations end-to-end on the EAs, e.g. groupby_sum
. For e.g pyarrow dtypes or potential GPU/distributed arrays they'd want their own things instead of casting back and forth to use our groupby.pyx code
Comment From: rhshadrach
For e.g pyarrow dtypes or potential GPU/distributed arrays they'd want their own things instead of casting back and forth to use our groupby.pyx code
Ref: https://github.com/pandas-dev/pandas/pull/51166#issue-1571121679
we should choose one naming scheme for all these methods instead of three slightly different ones. i.e. either a) shove everything into something like
groupby_op
or b) explicitly havegroupby_foo
for each of the relevant methods.
The two options aren't mutually exclusive; we could have groupby_op
which dispatches to each groupby_foo
. Then EA authors could override groupby_op
if that is convenient or groupby_foo
if they just want a certain method.