@@ -36,7 +36,7 @@ def test_merge_antijoin_on_different_columns(self):
36
36
"A" : [3.0 ],
37
37
"B" : ["c" ],
38
38
"C" : [np .nan ],
39
- "D" : np .array ([np .nan ], dtype = object ),
39
+ "D" : np .array ([np .nan ], dtype = right . D . dtype ),
40
40
},
41
41
index = [2 ],
42
42
)
@@ -46,7 +46,7 @@ def test_merge_antijoin_on_different_columns(self):
46
46
expected = DataFrame (
47
47
{
48
48
"A" : [np .nan ],
49
- "B" : np .array ([np .nan ], dtype = object ),
49
+ "B" : np .array ([np .nan ], dtype = left . B . dtype ),
50
50
"C" : [2.0 ],
51
51
"D" : ["d" ],
52
52
},
@@ -64,7 +64,7 @@ def test_merge_antijoin_nonunique_keys(self):
64
64
"A" : [1.0 ],
65
65
"B" : ["a" ],
66
66
"C" : [np .nan ],
67
- "D" : np .array ([np .nan ], dtype = object ),
67
+ "D" : np .array ([np .nan ], dtype = right . D . dtype ),
68
68
},
69
69
index = [0 ],
70
70
)
@@ -74,7 +74,7 @@ def test_merge_antijoin_nonunique_keys(self):
74
74
expected = DataFrame (
75
75
{
76
76
"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 ),
78
78
"C" : [2.0 , 4.0 ],
79
79
"D" : ["d" , "d" ],
80
80
},
@@ -93,7 +93,7 @@ def test_merge_antijoin_nans(self):
93
93
right = DataFrame ({"A" : [3.0 , 2.0 , np .nan ], "D" : ["d" , "e" , "f" ]})
94
94
result = merge (left , right , how = "left_anti" , on = "A" )
95
95
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 )}
97
97
)
98
98
tm .assert_frame_equal (result , expected )
99
99
0 commit comments