You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BUG: Pandas Series with dtype="ak" Returns NumPy Index Values #5428
When creating a pandas Series backed by the Arkouda extension dtype
(dtype="ak"), the index values are returned as a NumPy array instead
of an Arkouda-backed structure.
Reproducer
>>>importarkoudaasak>>>importpandasaspdIn [6]: s=pd.Series(["a","b","c"], dtype="ak")
In [7]: s.index.valuesOut[7]: array([0, 1, 2])
In [8]: type(s.index.values)
Out[8]: numpy.ndarray
Expected Behavior
For consistency with Arkouda-backed data structures, the index values
should be represented using an Arkouda-backed index (e.g., an
ArkoudaArray or Arkouda Index type), not materialized as a NumPy ndarray.
Returning a NumPy array:
Forces client-side materialization
Breaks scalability expectations
Is inconsistent with Arkouda-backed column behavior
Actual Behavior
s.index.values returns:
numpy.ndarray
Impact
Violates scalability guarantees
Introduces silent data transfer to the client
Creates inconsistent behavior between data and index representations
Proposed Fix
Ensure that Series created with dtype="ak" use an Arkouda-backed index
type by default, or override the .values accessor to return an Arkouda
structure instead of a NumPy array.
Activity
Closes Bears-R-Us#5428: BUG: Pandas Series with dtype=ak Returns NumP…
Closes Bears-R-Us#5428: BUG: Pandas Series with dtype=ak Returns NumP…
Closes #5428: BUG: Pandas Series with dtype=ak Returns NumPy Index Va…