Skip to content

REF: standardize astype in EA subclasses #41652

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

Closed
wants to merge 10 commits into from

Conversation

jbrockmendel
Copy link
Member

No description provided.

@simonjayhawkins
Copy link
Member

Thanks @jbrockmendel, by changing the accepted types for astype we are changing the api for 3rd party EAs. probably needs a release note. (subclassed EA need to accept the same types as the base class) cc @Dr-Irv if any comments

@simonjayhawkins simonjayhawkins added API Design ExtensionArray Extending pandas with custom dtypes or arrays. labels May 25, 2021
@simonjayhawkins simonjayhawkins changed the title REF: standardize astype in EA subclasses API: standardize astype in EA subclasses May 25, 2021
@Dr-Irv
Copy link
Contributor

Dr-Irv commented May 25, 2021

Thanks @jbrockmendel, by changing the accepted types for astype we are changing the api for 3rd party EAs. probably needs a release note. (subclassed EA need to accept the same types as the base class) cc @Dr-Irv if any comments

IMHO, I think you ought to first accept/merge in #41251 where I created overloads for astype in various subclasses to separate out the cases of using a base type versus a numpy dtype, and then merge in this one.

I think there is a separate issue of how we should handle astype(extension_dtype) for crossing between extension dtypes and regular types, and vice versa, which I think this PR is trying to address.

@jbrockmendel
Copy link
Member Author

ill just revert the type annotation

@jbrockmendel jbrockmendel changed the title API: standardize astype in EA subclasses REF: standardize astype in EA subclasses May 28, 2021
@jbrockmendel
Copy link
Member Author

Mothballing since i cant replicate the failures locally.

@jbrockmendel jbrockmendel added the Mothballed Temporarily-closed PR the author plans to return to label Jun 18, 2021
@jbrockmendel jbrockmendel deleted the ref-astypes-2 branch November 8, 2021 16:34
@jbrockmendel jbrockmendel removed the Mothballed Temporarily-closed PR the author plans to return to label Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design ExtensionArray Extending pandas with custom dtypes or arrays.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants