@@ -337,23 +337,24 @@ def test_concat_sparse_dense(self, fill_value):
337
337
exp = pd .concat ([self .dense3 , self .dense1 ], axis = 1 )
338
338
# See GH18914 and #18686 for why this should be
339
339
# A DataFrame
340
- assert isinstance (res , pd .DataFrame )
340
+ assert type (res ) is pd .DataFrame
341
341
# See GH16874
342
- assert res .isnull ()
343
- assert res [res .columns [0 ]]
344
- assert res .iloc [0 ,0 ]
342
+ assert not res .isnull ().empty
343
+ assert not res [res .columns [0 ]].empty
344
+ assert res .iloc [0 ,0 ] == self .dense3 .iloc [0 ,0 ]
345
+
345
346
for column in self .dense3 .columns :
346
347
tm .assert_series_equal (res [column ], exp [column ])
347
348
348
349
tm .assert_frame_equal (res , exp )
349
350
350
351
res = pd .concat ([sparse , self .dense3 ], axis = 1 )
351
352
exp = pd .concat ([self .dense1 , self .dense3 ], axis = 1 )
352
- assert isinstance (res , pd .DataFrame )
353
+ assert type (res ) is pd .DataFrame
353
354
# See GH16874
354
- assert res .isnull ()
355
- assert res [res .columns [0 ]]
356
- assert res .iloc [0 ,0 ]
355
+ assert not res .isnull (). empty
356
+ assert not res [res .columns [0 ]]. empty
357
+ assert res .iloc [0 ,0 ] == sparse . iloc [ 0 , 0 ]
357
358
for column in self .dense3 .columns :
358
359
tm .assert_series_equal (res [column ], exp [column ])
359
360
tm .assert_frame_equal (res , exp )
0 commit comments