Skip to content

BUG: indexing raises for ea into numpy series #55633

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

Merged
merged 1 commit into from
Oct 23, 2023
Merged

Conversation

phofl
Copy link
Member

@phofl phofl commented Oct 22, 2023

@phofl phofl added the Indexing Related to indexing on series/frames, not to indexes themselves label Oct 22, 2023
@@ -1816,7 +1816,8 @@ def np_can_hold_element(dtype: np.dtype, element: Any) -> Any:
if not isinstance(tipo, np.dtype):
# i.e. nullable IntegerDtype; we can put this into an ndarray
# losslessly iff it has no NAs
if element._hasna:
arr = element._values if isinstance(element, ABCSeries) else element
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to also include ABCIndex for df.loc[: ,"a"] = Index[Int64]?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no that's unpacked earlier

@mroeschke mroeschke added this to the 2.2 milestone Oct 23, 2023
@mroeschke mroeschke merged commit 03a4981 into pandas-dev:main Oct 23, 2023
@mroeschke
Copy link
Member

Thanks @phofl

@phofl phofl deleted the 55604 branch October 23, 2023 18:09
@edgarhuichen
Copy link

Has this been released? I still encounter error that's similar to 55604

@mroeschke
Copy link
Member

Not yet. Hopefully in January this should be released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: using iloc/loc to set a nullable int type on a non-nullable int column fails
3 participants