Skip to content

TEST: added test case for issue 41800 #50677

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions pandas/tests/series/methods/test_combine_first.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,16 @@ def test_combine_first_dt_tz_values(self, tz_naive_fixture):
)
exp = Series(exp_vals, name="ser1")
tm.assert_series_equal(exp, result)

def test_combine_first_timezone_series_with_empty_series(self):
# GH 41800
time_index = date_range(
datetime(2021, 1, 1, 1),
datetime(2021, 1, 1, 10),
freq="H",
tz="Europe/Rome",
)
s1 = Series(range(10), index=time_index)
s2 = Series(index=time_index)
result = s1.combine_first(s2)
tm.assert_series_equal(result, s1)