@@ -36,7 +36,7 @@ def test_merge_antijoin_on_different_columns(self):
3636 "A" : [3.0 ],
3737 "B" : ["c" ],
3838 "C" : [np .nan ],
39- "D" : np .array ([np .nan ], dtype = object ),
39+ "D" : np .array ([np .nan ], dtype = right . D . dtype ),
4040 },
4141 index = [2 ],
4242 )
@@ -46,7 +46,7 @@ def test_merge_antijoin_on_different_columns(self):
4646 expected = DataFrame (
4747 {
4848 "A" : [np .nan ],
49- "B" : np .array ([np .nan ], dtype = object ),
49+ "B" : np .array ([np .nan ], dtype = left . B . dtype ),
5050 "C" : [2.0 ],
5151 "D" : ["d" ],
5252 },
@@ -64,7 +64,7 @@ def test_merge_antijoin_nonunique_keys(self):
6464 "A" : [1.0 ],
6565 "B" : ["a" ],
6666 "C" : [np .nan ],
67- "D" : np .array ([np .nan ], dtype = object ),
67+ "D" : np .array ([np .nan ], dtype = right . D . dtype ),
6868 },
6969 index = [0 ],
7070 )
@@ -74,7 +74,7 @@ def test_merge_antijoin_nonunique_keys(self):
7474 expected = DataFrame (
7575 {
7676 "A" : [np .nan , np .nan ],
77- "B" : np .array ([np .nan , np .nan ], dtype = object ),
77+ "B" : np .array ([np .nan , np .nan ], dtype = left . B . dtype ),
7878 "C" : [2.0 , 4.0 ],
7979 "D" : ["d" , "d" ],
8080 },
@@ -93,7 +93,7 @@ def test_merge_antijoin_nans(self):
9393 right = DataFrame ({"A" : [3.0 , 2.0 , np .nan ], "D" : ["d" , "e" , "f" ]})
9494 result = merge (left , right , how = "left_anti" , on = "A" )
9595 expected = DataFrame (
96- {"A" : [1.0 ], "C" : ["a" ], "D" : np .array ([np .nan ], dtype = object )}
96+ {"A" : [1.0 ], "C" : ["a" ], "D" : np .array ([np .nan ], dtype = right . D . dtype )}
9797 )
9898 tm .assert_frame_equal (result , expected )
9999
0 commit comments