-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
WARN: Remove false positive warning for iloc inplaceness #48397
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
Changes from 21 commits
8f7432b
9ac855b
2c3920c
8fc58f3
ab1080c
1aa0448
40427c4
7240895
a1a824c
03bc147
44e910d
0d2c2c4
7f04bdc
c4b0780
49da3ce
7e4e5e8
805ec5d
7762cda
ead315a
8a772c7
b4714ce
a6de70e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,9 +91,13 @@ def test_diff_datetime_with_nat_zero_periods(self, tz): | |
|
||
df[1] = ser.copy() | ||
|
||
msg = "will attempt to set the values inplace instead" | ||
with tm.assert_produces_warning(FutureWarning, match=msg): | ||
df.iloc[:, 0] = pd.NaT | ||
if tz is None: | ||
msg = "will attempt to set the values inplace instead" | ||
with tm.assert_produces_warning(FutureWarning, match=msg): | ||
df.iloc[:, 0] = pd.NaT | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @phofl i think i misunderstood earlier when i said this should warn. i was under the impression that the RHS was There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that is an existing problem that i think is orthogonal to this PR, so no need to hold up on this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep agreed, the NaT gets cast to an all NaT Series without a timezone, hence this seems equal There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ideal then would be to assert_warns(None) unconditionally and xfail the tzaware case There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
else: | ||
with tm.assert_produces_warning(None): | ||
df.iloc[:, 0] = pd.NaT | ||
|
||
expected = df - df | ||
assert expected[0].isna().all() | ||
|
Uh oh!
There was an error while loading. Please reload this page.