Repository navigation
Closes #5421: Support pandas Series and ArkoudaExtensionArray in GroupBy Reductions - #5422
Merged
Conversation
ajpotts
force-pushed
the
5421_NotImplementedError_pdarray_does_not_support_iteration_in_GroupBy.mean_for_ArkoudaExtensionArray
branch
from
February 19, 2026 17:12
2e46d33 to
80b6a29
Compare
… iteration in GroupBy.mean for ArkoudaExtensionArray
ajpotts
force-pushed
the
5421_NotImplementedError_pdarray_does_not_support_iteration_in_GroupBy.mean_for_ArkoudaExtensionArray
branch
from
February 19, 2026 17:30
80b6a29 to
d32c0b8
Compare
ajpotts
marked this pull request as ready for review
February 19, 2026 18:06
ajpotts
enabled auto-merge
February 19, 2026 18:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR enhances
arkouda.pandas.groupbyclass.GroupByto accept:pandas.Seriesbacked byArkoudaExtensionArrayArkoudaExtensionArraydirectlypdarrayinputs (unchanged behavior)Previously,
GroupBy.aggregate()and reduction helpers (e.g.mean,sum, etc.) required a rawpdarray. Passing a pandasSeriesorArkoudaExtensionArrayresulted in aTypeError.This change introduces an internal helper
_unwrap_to_pdarray()thatextracts the backing
pdarraywhen a supported pandas container ispassed.
Motivation
When using the
.akaccessor, users often construct groupby objectsfrom Arkouda-backed pandas structures. It is natural to expect:
to behave the same as:
This PR removes unnecessary friction while preserving scalability and
avoiding any NumPy materialization.
Implementation Details
1.
_unwrap_to_pdarray()helperpdarraypandas.Seriesbacked byArkoudaExtensionArrayArkoudaExtensionArraypdarrayTypeErrorfor unsupported inputs2. Updated
GroupBy.aggregate()_unwrap_to_pdarray()before performing segmented reductions.3. Typing Improvements
Expanded type annotations to reflect support for:
Backward Compatibility
pdarrayusage.Tests Added
New tests verify:
GroupBy.mean()accepts a pandas Series backed byArkoudaExtensionArrayGroupBy.mean()accepts anArkoudaExtensionArraydirectlyTypeErrorpdarraybehavior remains unchangedPerformance Impact
None.
The change is purely input normalization and does not affect: -
Segmented reduction logic - Server execution paths - Distributed
performance characteristics
All reductions still operate entirely on Arkouda server-side arrays.
Closes #5421: NotImplementedError: pdarray does not support iteration in GroupBy.mean for ArkoudaExtensionArray