Repository navigation
Closes #5087 pandas series accessor for arkouda - #5099
Merged
ajpotts merged 6 commits intoDec 17, 2025
Merged
Conversation
ajpotts
force-pushed
the
5087_pandas_series_accessor_for_arkouda_v2
branch
from
December 2, 2025 16:59
55ea6f2 to
c37e870
Compare
ajpotts
force-pushed
the
5087_pandas_series_accessor_for_arkouda_v2
branch
from
December 2, 2025 17:48
c37e870 to
9851e1e
Compare
ajpotts
marked this pull request as ready for review
December 2, 2025 17:58
ajpotts
force-pushed
the
5087_pandas_series_accessor_for_arkouda_v2
branch
3 times, most recently
from
December 8, 2025 23:12
11d969d to
1cc36dd
Compare
drculhane
approved these changes
Dec 11, 2025
drculhane
left a comment
Contributor
There was a problem hiding this comment.
Looks straightforward.
1RyanK
approved these changes
Dec 11, 2025
ajpotts
force-pushed
the
5087_pandas_series_accessor_for_arkouda_v2
branch
from
December 16, 2025 21:46
9462b9b to
0abf852
Compare
1RyanK
approved these changes
Dec 17, 2025
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.
Add
.akSeries Accessor & Improve EA ConstructionThis PR introduces a new
.akaccessor forpandas.Series, completing the pandas-side API for Arkouda-backed objects and bringing Series to parity with the existing Index/MultiIndex and DataFrame accessors.Summary of Changes
1. Add
ArkoudaSeriesAccessor(pd.Series.ak)New module:
arkouda/pandas/extension/_series_accessor.pyThis accessor enables seamless, zero-copy transitions between:
pdarray,Strings,Categorical)Supported API:
s.ak.to_ak()– Convert a Series to an Arkouda-backed Series while preserving index and names.ak.collect()– Materialize an Arkouda-backed Series back to NumPys.ak.to_ak_legacy()– Produce the actual Arkouda array objectpd.Series.ak.from_ak_legacy()– Wrap a legacy Arkouda array in a Series without materializings.ak.is_arkouda– Introspection flagThe implementation follows the same design, style, and semantics as the existing Index and DataFrame accessors.
2. Register accessor and expose it
ArkoudaSeriesAccessoris now imported and exported fromarkouda.pandas.extension.__init__, making it part of the public API.3. Improve
ArkoudaExtensionArray._from_sequenceThis new implementation adds a dtype-dispatching factory that:
pdarray,Strings,Categorical)ArkoudaArray,ArkoudaStringArray,ArkoudaCategoricalArray)pdarray(viaak_array)This method is required for correct Series construction and zero-copy wrapping in the accessor.
4. Add comprehensive unit tests
New file:
tests/pandas/extension/series_accessor.pyTests cover:
_pandas_series_to_ak_legacyand_ak_legacy_to_pandas_seriesto_ak()Stringsvspdarray)These tests mirror the Index accessor test style to maintain consistency.
Motivation
Arkouda’s pandas integration already supports (PRs pending #5075 and #5071):
.akaccessor.akaccessorSeries was the missing piece. This PR completes the pandas API surface and unlocks:
User-Facing Impact
Users can now write:
Closes #5087: pandas series accessor for arkouda