Skip to content

Commit e598f4c

Browse files
add test for pandas-devgh-33559
1 parent 211328c commit e598f4c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pandas/tests/extension/base/constructors.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ def test_series_constructor_no_data_with_index(self, dtype, na_value):
3838
expected = pd.Series([na_value] * 3, index=[1, 2, 3], dtype=dtype)
3939
self.assert_series_equal(result, expected)
4040

41+
# GH 33559 - empty index
42+
result = pd.Series(index=[], dtype=dtype)
43+
expected = pd.Series([], index=pd.Index([], dtype="object"), dtype=dtype)
44+
self.assert_series_equal(result, expected)
45+
4146
def test_series_constructor_scalar_na_with_index(self, dtype, na_value):
4247
result = pd.Series(na_value, index=[1, 2, 3], dtype=dtype)
4348
expected = pd.Series([na_value] * 3, index=[1, 2, 3], dtype=dtype)

0 commit comments

Comments
 (0)