Skip to content

BUG: setting object dtype Series row with an Extension Array #38271

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
arw2019 opened this issue Dec 3, 2020 · 0 comments · Fixed by #38266
Closed

BUG: setting object dtype Series row with an Extension Array #38271

arw2019 opened this issue Dec 3, 2020 · 0 comments · Fixed by #38266
Labels
Bug ExtensionArray Extending pandas with custom dtypes or arrays. Indexing Related to indexing on series/frames, not to indexes themselves
Milestone

Comments

@arw2019
Copy link
Member

arw2019 commented Dec 3, 2020

On 1.2 master:

In [11]: import numpy as np
    ...: import pandas as pd
    ...: 
    ...: ser = pd.Series(1, index=list("abcde"), dtype="object")
    ...: 
    ...: expected = pd.array([0,0,3,0,0])
    ...: ser.loc["a"] = expected
    ...: result = ser[0]

In [12]: ser
Out[12]: 
a    0
b    0
c    3
d    0
e    0
dtype: Int64

I expect:

In [14]: ser
Out[14]: 
a    [0, 0, 3, 0, 0]
b               1
c               1
d               1
e               1
dtype: object
@arw2019 arw2019 added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Dec 3, 2020
@jorisvandenbossche jorisvandenbossche added ExtensionArray Extending pandas with custom dtypes or arrays. Indexing Related to indexing on series/frames, not to indexes themselves and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Dec 3, 2020
@jreback jreback added this to the 1.2 milestone Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug ExtensionArray Extending pandas with custom dtypes or arrays. Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants