File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -344,10 +344,17 @@ def test_concat_sparse_dense(self):
344
344
345
345
res = pd .concat ([self .dense3 , sparse ], axis = 1 )
346
346
exp = pd .concat ([self .dense3 , self .dense1 ], axis = 1 )
347
- assert isinstance (res , pd .SparseDataFrame )
347
+ # See GH18914 and #18686 for why this should be
348
+ # A DataFrame
349
+ assert isinstance (res , pd .DataFrame )
350
+ for column in self .dense3 .columns :
351
+ tm .assert_series_equal (res [column ], exp [column ])
352
+
348
353
tm .assert_frame_equal (res , exp )
349
354
350
355
res = pd .concat ([sparse , self .dense3 ], axis = 1 )
351
356
exp = pd .concat ([self .dense1 , self .dense3 ], axis = 1 )
352
- assert isinstance (res , pd .SparseDataFrame )
357
+ assert isinstance (res , pd .DataFrame )
358
+ for column in self .dense3 .columns :
359
+ tm .assert_series_equal (res [column ], exp [column ])
353
360
tm .assert_frame_equal (res , exp )
You can’t perform that action at this time.
0 commit comments