We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd2b41d commit 6d72476Copy full SHA for 6d72476
pandas/tests/frame/indexing/test_where.py
@@ -1076,17 +1076,11 @@ def test_where_other_nullable_dtype():
1076
1077
1078
def test_where_inplace_string_array_consistency():
1079
- # GH#46512 - inplace and non-inplace should have consistent behavior
1080
- # for StringArray with NA-like values
+ # GH#46512
1081
df = DataFrame({"A": ["1", "", "3"]}, dtype="string")
1082
df_inplace = df.copy()
1083
1084
- # Test non-inplace
1085
result = df.where(df != "", np.nan)
1086
-
1087
- # Test inplace
1088
df_inplace.where(df_inplace != "", np.nan, inplace=True)
1089
1090
1091
- # Results should be identical
1092
tm.assert_frame_equal(result, df_inplace)
0 commit comments