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

BUG: iloc.__setitem__ with dict value and mixed dtypes #38335

Merged
merged 10 commits into from
Dec 12, 2020

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx
  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

expected = df.copy()
rhs = {"x": 9, "y": 99}
df.loc[5] = rhs
expected.loc[5] = [9, 99]
tm.assert_frame_equal(df, expected)

# GH#38335 same thing, mixed dtypes
Copy link
Contributor

Choose a reason for hiding this comment

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

was this broken too? (or just iloc as indicated)?

is [] ok?

Copy link
Member Author

Choose a reason for hiding this comment

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

loc is broken too. setitem is OK i think.

@jreback jreback added the Indexing Related to indexing on series/frames, not to indexes themselves label Dec 8, 2020
@jreback jreback added this to the 1.3 milestone Dec 8, 2020
@jreback jreback added the Bug label Dec 8, 2020
pandas/core/indexing.py Show resolved Hide resolved
@jreback jreback merged commit 85acd65 into pandas-dev:master Dec 12, 2020
@jbrockmendel jbrockmendel deleted the bug-setitem branch December 13, 2020 00:03
luckyvs1 pushed a commit to luckyvs1/pandas that referenced this pull request Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants