We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c4da919 commit 900f3b1Copy full SHA for 900f3b1
pandas/tests/series/methods/test_compare.py
@@ -138,3 +138,15 @@ def test_compare_datetime64_and_string():
138
tm.assert_series_equal(result_eq1, expected_eq)
139
tm.assert_series_equal(result_eq2, expected_eq)
140
tm.assert_series_equal(result_neq, expected_neq)
141
+
142
+def test_comparison_string_mixed_object():
143
+ pd.options.future.infer_string = True
144
145
+ ser_string = pd.Series(["a", "b"], dtype="string")
146
+ ser_mixed = pd.Series([1, "b"])
147
148
+ result = ser_string == ser_mixed
149
+ expected = pd.Series([False, True], dtype="boolean")
150
+ tm.assert_series_equal(result, expected)
151
152
+ pd.options.future.infer_string = False
0 commit comments