-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Direct delegation of Series methods to ExtensionArrays #21305
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
Comments
Quick comment: for the argsort case, I think this could be solved by changing But indeed, we should discuss this more in general. |
In the abstract, I'm also interested in this. The set of methods that are dispatched to currently is pretty ad-hoc (essentially enough to get |
2 thoughts here
|
I don't think there's any appetite for adding an |
Yeah I think this is largely being done already today. We can open separate issues for methods that don't do this today. Closing |
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 inpandas/pandas/core/base.py
Line 1041 in 4274b84
__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.The text was updated successfully, but these errors were encountered: