def test_from_coo_long_repr(self): # GH 13114 # test it doesn't raise error. Formatting is tested in test_format tm._skip_if_no_scipy() import scipy.sparse sparse = SparseSeries.from_coo(scipy.sparse.rand(350, 18)) repr(sparse)
def test_from_coo_nodense_index(self): ss = SparseSeries.from_coo(self.coo_matrices[0], dense_index=False) check = self.sparse_series[2] check = check.dropna().to_sparse() tm.assert_sp_series_equal(ss, check)
def test_from_coo_dense_index(self): ss = SparseSeries.from_coo(self.coo_matrices[0], dense_index=True) check = self.sparse_series[2] tm.assert_sp_series_equal(ss, check)