Skip to content

Direct delegation of Series methods to ExtensionArrays #21305

@xhochy

Description

@xhochy

During the implementation of non-numpy backed ExtensionArrays I quite often run into the case where it is simpler for me to write a complete re-implementation of the method defined on pd.Series instead of using the current implementation that only delegates part of the work. It would probably make sense to introduce some sort of delegation mechanism, either we continue the delegation like in

def unique(self):
or we could possibly add really general interface like NumPy's __array_ufunc__: https://docs.scipy.org/doc/numpy/reference/arrays.classes.html#numpy.class.__array_ufunc__

My use case where this arises currently is coming from #21296 and pd.Series.argsort but I expect that there will be much more cases in this direction while I continue to implement the ExtensionArray interface for Arrow Arrays.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions