Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
BUG: df[col] = arr should not overwrite data in df[col] #35417
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: df[col] = arr should not overwrite data in df[col] #35417
Changes from all commits
a1ce4fc
b1913b7
e600237
140f5f2
c096c5d
cbd45e8
989ba97
bf6e5f5
a5ffd10
e126ab5
8c4f9f3
f716904
59e447a
09e89ee
11b8093
4271303
ed0af51
dffae7e
a7f363b
53992df
0a133d7
db1b668
858d6cb
3deb0a7
68e8715
3a74222
b0896be
f9498a3
d81a696
33ef890
ea49ae2
1a850c8
fed4782
0633cc6
a00702a
1dd58ab
4ffe7f4
247d0f8
9164c83
080c7e9
b47ed01
0290975
13b683d
7e9ea2d
bd55d67
ae9c707
4dd24ca
253f625
0b28fc0
9c5e6fa
2e0bf61
04af8fa
1d2b6d7
65d466b
13077e9
f013ec3
66d5ed0
f23245b
23e9462
6c8b15f
03b3015
687d262
9164a1e
02585c5
3731fc8
184f013
8503671
34a96f7
a82f62b
fe58441
28e6296
1e802b8
c1ab90f
382def7
4023a16
1e60537
072ef99
51fe3b2
7edd45a
9783bce
df6110e
d7257f2
1f9f9c3
36fb2d4
1292a92
9b127bf
831dc71
1d50325
d72f379
81e92d8
67435f8
ab833aa
017501e
0219f7f
032a55a
51d102b
bd6816b
908b57b
62f2437
36b3302
37c9d22
0862ece
38d8106
647a393
8b8d6a2
9c6e008
8285ece
270be1e
9cf69c9
065869a
ca260c5
5dcdc4a
a03dcc3
a1c5732
47b841a
df060a5
017b817
0821a60
608fb9d
a70fcc2
effd630
4e30881
a254ed0
df7b4d3
8f49c7f
a66afa0
fb95732
c0bace5
9e43fe9
f47fa2e
29d3bba
5b8de9a
79c7ae2
fa2dcea
0e8f671
3cdeeb4
acd3514
d97a1ac
4342f5d
f4dafc6
bebb12f
04475e3
ed6f3ec
fe9fe66
1ae50bf
9d32c62
8972875
6524331
123568d
8bef37a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't raise a SettingWithCopy warning? Above a similar sliced case seems to assert a warning: https://github.com/pandas-dev/pandas/pull/35417/files#diff-f3753d3792b1cdb7c319380f7d1f58636ad0f9bbce037eb6920a6f9830412e9cR559
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
original_df["a"] = [5, 5, 5]
here is setting a new array, not overwriting an existing one, whereas the .loc settings in the linked tests are writing into existing arraysThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated both tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would split the inplace to a separate test