Skip to content
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

QST: Should list-likes with pd.NA have an inferred nullable dtype if possible? #33986

Closed
dsaxton opened this issue May 5, 2020 · 1 comment
Closed
Labels
Constructors Series/DataFrame/Index/pd.array Constructors NA - MaskedArrays Related to pd.NA and nullable extension arrays

Comments

@dsaxton
Copy link
Member

dsaxton commented May 5, 2020

It looks like in each of these cases the dtype is inferred as object, but does it make sense to try to use a nullable extension type when possible?

[ins] In [1]: pd.Series([1, 2, pd.NA]).dtype                                                                                                                                                                 
Out[1]: dtype('O')

[ins] In [2]: pd.Series([True, False, pd.NA]).dtype                                                                                                                                                          
Out[2]: dtype('O')

[ins] In [3]: pd.Series(["a", "b", pd.NA]).dtype                                                                                                                                                             
Out[3]: dtype('O')
@dsaxton dsaxton added Needs Triage Issue that has not been reviewed by a pandas team member Usage Question Constructors Series/DataFrame/Index/pd.array Constructors NA - MaskedArrays Related to pd.NA and nullable extension arrays and removed Needs Triage Issue that has not been reviewed by a pandas team member Usage Question labels May 5, 2020
@simonjayhawkins
Copy link
Member

@dsaxton Thanks for the report. closing as duplicate of #33662

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Constructors Series/DataFrame/Index/pd.array Constructors NA - MaskedArrays Related to pd.NA and nullable extension arrays
Projects
None yet
Development

No branches or pull requests

2 participants