

def test_sparse_series(self):
    s = tm.makeStringSeries()
    s[3:5] = np.nan
    ss = s.to_sparse()
    self._check_roundtrip(ss, tm.assert_series_equal, check_series_type=True)
    ss2 = self.to_sparse(kind='integer')
    self._check_roundtrip(ss2, tm.assert_series_equal, check_series_type=True)
    ss3 = s.to_sparse(fill_value=0)
    self._check_roundtrip(ss3, tm.assert_series_equal, check_series_type=True)

dataset/ETHPy150Open pydata/pandas/pandas/io/tests/test_packers.py TestSparse.test_sparse_series/VarMisuse@54/68 `s`->`self`