@@ -114,14 +114,14 @@ def test_apply_with_reduce_empty():
114
114
result = empty_frame .apply (x .append , axis = 1 , result_type = "expand" )
115
115
tm .assert_frame_equal (result , empty_frame )
116
116
result = empty_frame .apply (x .append , axis = 1 , result_type = "reduce" )
117
- expected = Series ([], index = pd . Index ([], dtype = object ), dtype = np .float64 )
117
+ expected = Series ([], dtype = np .float64 )
118
118
tm .assert_series_equal (result , expected )
119
119
120
120
empty_with_cols = DataFrame (columns = ["a" , "b" , "c" ])
121
121
result = empty_with_cols .apply (x .append , axis = 1 , result_type = "expand" )
122
122
tm .assert_frame_equal (result , empty_with_cols )
123
123
result = empty_with_cols .apply (x .append , axis = 1 , result_type = "reduce" )
124
- expected = Series ([], index = pd . Index ([], dtype = object ), dtype = np .float64 )
124
+ expected = Series ([], dtype = np .float64 )
125
125
tm .assert_series_equal (result , expected )
126
126
127
127
# Ensure that x.append hasn't been called
@@ -147,7 +147,7 @@ def test_nunique_empty():
147
147
tm .assert_series_equal (result , expected )
148
148
149
149
result = df .T .nunique ()
150
- expected = Series ([], index = pd . Index ([]), dtype = np .float64 )
150
+ expected = Series ([], dtype = np .float64 )
151
151
tm .assert_series_equal (result , expected )
152
152
153
153
0 commit comments