@@ -1297,13 +1297,14 @@ def test_concat_rename_index(self):
1297
1297
1298
1298
def test_concat_with_ordered_dict (self ):
1299
1299
# GH 21510
1300
- ps = pd .concat (OrderedDict ([('First' , pd .Series (range (3 ))),
1301
- ('Another' , pd .Series (range (4 )))]))
1302
- ps_list = list (ps .keys ())
1303
- exp_list = [('First' , 0 ), ('First' , 1 ), ('First' , 2 ),
1304
- ('Another' , 0 ), ('Another' , 1 ),
1305
- ('Another' , 2 ), ('Another' , 3 )]
1306
- assert ps_list == exp_list
1300
+ result = pd .concat (OrderedDict ([('First' , pd .Series (range (3 ))),
1301
+ ('Another' , pd .Series (range (4 )))]))
1302
+ a = pd .Series (range (3 ), range (3 ))
1303
+ b = pd .Series (range (4 ), range (4 ))
1304
+ a .index = pd .MultiIndex .from_tuples ([('First' , v ) for v in a .index ])
1305
+ b .index = pd .MultiIndex .from_tuples ([('Another' , v ) for v in b .index ])
1306
+ expected = a .append (b )
1307
+ tm .assert_series_equal (result , expected )
1307
1308
1308
1309
def test_crossed_dtypes_weird_corner (self ):
1309
1310
columns = ['A' , 'B' , 'C' , 'D' ]
0 commit comments