Skip to content

Commit e95a46a

Browse files
lpizzinidevphofl
authored andcommitted
TEST: added test case for issue 41800 (pandas-dev#50677)
* TEST: added test case for issue 41800 addresses pandas-dev#41800 * fix lint error * fix lint error * added assert_series_equal control and changed date_range call
1 parent 9a908b0 commit e95a46a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pandas/tests/series/methods/test_combine_first.py

+13
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,16 @@ def test_combine_first_dt_tz_values(self, tz_naive_fixture):
100100
)
101101
exp = Series(exp_vals, name="ser1")
102102
tm.assert_series_equal(exp, result)
103+
104+
def test_combine_first_timezone_series_with_empty_series(self):
105+
# GH 41800
106+
time_index = date_range(
107+
datetime(2021, 1, 1, 1),
108+
datetime(2021, 1, 1, 10),
109+
freq="H",
110+
tz="Europe/Rome",
111+
)
112+
s1 = Series(range(10), index=time_index)
113+
s2 = Series(index=time_index)
114+
result = s1.combine_first(s2)
115+
tm.assert_series_equal(result, s1)

0 commit comments

Comments
 (0)