-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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: Implement cum* methods for PyArrow strings #60633
base: main
Are you sure you want to change the base?
ENH: Implement cum* methods for PyArrow strings #60633
Conversation
The only other way I think that would be reasonable to implement this in would be to use nanoarrow, but that's a larger implementation. I think this is fine for now - just not very performant but that can always be improved later |
@@ -163,10 +166,10 @@ def test_agg_cython_table_transform_series(request, series, func, expected): | |||
# GH21224 | |||
# test transforming functions in | |||
# pandas.core.base.SelectionMixin._cython_table (cumprod, cumsum) | |||
if series.dtype == "string" and func == "cumsum": | |||
if series.dtype == "string" and func == "cumsum" and not HAS_PYARROW: |
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.
Can tackle the StringArray
case in a followup or do so here if preferred.
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.
lgtm. thanks for getting this started
probably worth adding a note for 3.0 as well
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.Implements
cumsum
,cummin
, andcummax
for PyArrow-backed strings. I don't see a way to do this without passing through NumPy - if there are other ideas for approaching happy to give those a shot.cc @WillAyd @jorisvandenbossche