We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4828860 commit f9843b7Copy full SHA for f9843b7
pandas/tests/sparse/test_indexing.py
@@ -543,6 +543,7 @@ def test_loc_slice(self):
543
tm.assert_sp_series_equal(sparse.loc[:'B'], orig.loc[:'B'].to_sparse())
544
545
def test_reindex(self):
546
+ # GH 15447
547
orig = self.orig
548
sparse = self.sparse
549
@@ -564,6 +565,12 @@ def test_reindex(self):
564
565
# Incomplete keys are not accepted for reindexing:
566
sparse.reindex(['A', 'C'])
567
568
+ # "copy" argument:
569
+ res = sparse.reindex(sparse.index, copy=True)
570
+ exp = orig.reindex(orig.index, copy=True).to_sparse()
571
+ tm.assert_sp_series_equal(res, exp)
572
+ self.assertIsNot(sparse, res)
573
+
574
575
class TestSparseDataFrameIndexing(tm.TestCase):
576
0 commit comments