

def test_sparse_panel(self):
    with warnings.catch_warnings(record=True):
        items = ['x', 'y', 'z']
        p = Panel(dict(((i, tm.makeDataFrame().ix[:2, :2]) for i in items)))
        sp = p.to_sparse()
        self._check_roundtrip(sp, tm.assert_panel_equal, check_panel_type=True)
        sp2 = p.to_sparse(kind='integer')
        self._check_roundtrip(sp2, tm.assert_panel_equal, check_panel_type=True)
        sp3 = p.to_sparse(fill_value=0)
        self._check_roundtrip(sp3, tm.assert_panel_equal, check_panel_type=True)

dataset/ETHPy150Open pydata/pandas/pandas/io/tests/test_packers.py TestSparse.test_sparse_panel/original