Skip to content

Commit 8ba012b

Browse files
committed
TST: check inequality by comparing categorical with NaN ( pandas-dev#28384 )
1 parent f3c12fb commit 8ba012b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pandas/tests/arrays/categorical/test_missing.py

+9
Original file line numberDiff line numberDiff line change
@@ -148,3 +148,12 @@ def test_use_inf_as_na_outside_context(self, values, expected):
148148
result = pd.isna(DataFrame(cat))
149149
expected = DataFrame(expected)
150150
tm.assert_frame_equal(result, expected)
151+
152+
def test_compare_unequal(self):
153+
s1 = Series(["a", "b", np.nan], dtype="category")
154+
s2 = Series(["b", "a", "a"], dtype="category")
155+
156+
result = s1 != s2
157+
expected = Series([True, True, True], dtype=bool)
158+
159+
tm.assert_series_equal(result, expected)

0 commit comments

Comments
 (0)