10000 BUG: fix .iat assignment creates a new column by RoeiRaz · Pull Request #24495 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

BUG: fix .iat assignment creates a new column #24495

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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
changes test to use assert_frame_equal()
  • Loading branch information
RoeiRaz committed Dec 30, 2018
commit 486c25de0e2423da1089cecb1d7becbfcabd4c8c
8 changes: 4 additions & 4 deletions pandas/tests/indexing/test_scalar.py
5B85
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def test_mixed_index_at_iat_loc_iloc_dataframe(self):

def test_iat_setter_incompatible_assignment(self):
# GH 23236
df = DataFrame({'a': [0, 1], 'b': [4, 5]})
df.iat[0, 0] = None
assert np.isnan(df.iat[0, 0])
assert len(df.index) == 2
result = DataFrame({'a': [0, 1], 'b': [4, 5]})
result.iat[0, 0] = None
expected = DataFrame({"a": [None, 1], "b": [4, 5]})
tm.assert_frame_equal(result, expected)
0