Ejemplo n.º 1
0
    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)
Ejemplo n.º 2
0
    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)
Ejemplo n.º 3
0
 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)
Ejemplo n.º 4
0
 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)
Ejemplo n.º 5
0
 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)
Ejemplo n.º 6
0
 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)