We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fd5b686 commit da260e8Copy full SHA for da260e8
pandas/tests/dtypes/test_concat.py
@@ -49,3 +49,20 @@ def test_concat_periodarray_2d():
49
50
with pytest.raises(ValueError, match=msg):
51
_concat.concat_compat([arr[:2], arr[2:]], axis=1)
52
+
53
54
+def test_concat_series_between_empty_and_tzaware_series():
55
+ tzaware_time = pd.Timestamp("2020-01-01T00:00:00+00:00")
56
+ ser1 = Series(index=[tzaware_time], data=0, dtype=float)
57
+ ser2 = Series(dtype=float)
58
59
+ result = pd.concat([ser1, ser2], axis=1)
60
+ expected = pd.DataFrame(
61
+ data=[
62
+ (0.0, None),
63
+ ],
64
+ index=pd.Index([tzaware_time], dtype=object),
65
+ columns=[0, 1],
66
+ dtype=float,
67
+ )
68
+ tm.assert_frame_equal(result, expected)
0 commit comments