-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
ENH: Groupby.transform support string input with engine=numba #53579
Conversation
3572e06
to
45a2721
Compare
|
||
elif func not in base.transform_kernel_allowlist: | ||
msg = f"'{func}' is not a valid function name for transform(name)" | ||
raise ValueError(msg) | ||
elif func in base.cythonized_kernels or func in base.transformation_kernels: | ||
# cythonized transform or canned "agg+broadcast" | ||
if engine is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there are no transformation kernels(e.g. cumsum, shift etc.) for numba yet, this is untested.
Should be OK, though, since this didn't work before anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious, what type of error do we get when we pass engine="cython", engine_kwargs={"nogil": True}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, it gives something like
Groupby.method() got an unexpected argument engine
@td.skip_if_no("numba") | ||
@pytest.mark.parametrize( | ||
"agg_func", [["min", "max"], "min", {"B": ["min", "max"], "C": "sum"}] | ||
) | ||
def test_multifunc_notimplimented(agg_func): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to change the test since multifuncs (list/dicts of funcs) aren't supported anyways in transform for the cython engine as well.
Thanks @lithomas1 |
…-dev#53579) * ENH: Groupby.transform support string input with engine=numba * remove xfail
…-dev#53579) * ENH: Groupby.transform support string input with engine=numba * remove xfail
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.