Skip to content

Commit 4a6661f

Browse files
Licht-Tgfyoung
authored andcommitted
TST: Add test of combine_first with asymmetric other
1 parent a2a74ef commit 4a6661f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pandas/tests/frame/test_combine_concat.py

+10
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,16 @@ def test_combine_first_int(self):
750750
tm.assert_frame_equal(res, df1)
751751
assert res['a'].dtype == 'int64'
752752

753+
def test_combine_first_with_asymmetric_other(self):
754+
# GH20699
755+
df1 = pd.DataFrame({'isInt': [1]})
756+
df2 = pd.DataFrame({'isBool': [True]})
757+
758+
res = df1.combine_first(df2)
759+
exp = pd.DataFrame({'isBool': [True], 'isInt': [1]})
760+
761+
tm.assert_frame_equal(res, exp)
762+
753763
def test_concat_datetime_datetime64_frame(self):
754764
# #2624
755765
rows = []

0 commit comments

Comments
 (0)