|
71 | 71 | ignore_natural_naming_warning = pytest.mark.filterwarnings(
|
72 | 72 | "ignore:object name:tables.exceptions.NaturalNameWarning"
|
73 | 73 | )
|
74 |
| -ignore_sparse = pytest.mark.filterwarnings("ignore:Sparse:FutureWarning") |
75 |
| -ignore_dataframe_tosparse = pytest.mark.filterwarnings( |
76 |
| - "ignore:DataFrame.to_sparse:FutureWarning" |
77 |
| -) |
78 |
| -ignore_series_tosparse = pytest.mark.filterwarnings( |
79 |
| - "ignore:Series.to_sparse:FutureWarning" |
80 |
| -) |
81 | 74 |
|
82 | 75 | # contextmanager to ensure the file cleanup
|
83 | 76 |
|
@@ -2677,40 +2670,6 @@ def test_overwrite_node(self):
|
2677 | 2670 |
|
2678 | 2671 | tm.assert_series_equal(store["a"], ts)
|
2679 | 2672 |
|
2680 |
| - @ignore_sparse |
2681 |
| - @ignore_dataframe_tosparse |
2682 |
| - def test_sparse_with_compression(self): |
2683 |
| - |
2684 |
| - # GH 2931 |
2685 |
| - |
2686 |
| - # make sparse dataframe |
2687 |
| - arr = np.random.binomial(n=1, p=0.01, size=(1000, 10)) |
2688 |
| - df = DataFrame(arr).to_sparse(fill_value=0) |
2689 |
| - |
2690 |
| - # case 1: store uncompressed |
2691 |
| - self._check_double_roundtrip( |
2692 |
| - df, tm.assert_frame_equal, compression=False, check_frame_type=True |
2693 |
| - ) |
2694 |
| - |
2695 |
| - # case 2: store compressed (works) |
2696 |
| - self._check_double_roundtrip( |
2697 |
| - df, tm.assert_frame_equal, compression="zlib", check_frame_type=True |
2698 |
| - ) |
2699 |
| - |
2700 |
| - # set one series to be completely sparse |
2701 |
| - df[0] = np.zeros(1000) |
2702 |
| - |
2703 |
| - # case 3: store df with completely sparse series uncompressed |
2704 |
| - self._check_double_roundtrip( |
2705 |
| - df, tm.assert_frame_equal, compression=False, check_frame_type=True |
2706 |
| - ) |
2707 |
| - |
2708 |
| - # case 4: try storing df with completely sparse series compressed |
2709 |
| - # (fails) |
2710 |
| - self._check_double_roundtrip( |
2711 |
| - df, tm.assert_frame_equal, compression="zlib", check_frame_type=True |
2712 |
| - ) |
2713 |
| - |
2714 | 2673 | def test_select(self):
|
2715 | 2674 |
|
2716 | 2675 | with ensure_clean_store(self.path) as store:
|
@@ -3858,8 +3817,6 @@ def test_start_stop_multiple(self):
|
3858 | 3817 | expected = df.loc[[0], ["foo", "bar"]]
|
3859 | 3818 | tm.assert_frame_equal(result, expected)
|
3860 | 3819 |
|
3861 |
| - @ignore_sparse |
3862 |
| - @ignore_dataframe_tosparse |
3863 | 3820 | def test_start_stop_fixed(self):
|
3864 | 3821 |
|
3865 | 3822 | with ensure_clean_store(self.path) as store:
|
@@ -3899,10 +3856,6 @@ def test_start_stop_fixed(self):
|
3899 | 3856 | df = tm.makeDataFrame()
|
3900 | 3857 | df.iloc[3:5, 1:3] = np.nan
|
3901 | 3858 | df.iloc[8:10, -2] = np.nan
|
3902 |
| - dfs = df.to_sparse() |
3903 |
| - store.put("dfs", dfs) |
3904 |
| - with pytest.raises(NotImplementedError): |
3905 |
| - store.select("dfs", start=0, stop=5) |
3906 | 3859 |
|
3907 | 3860 | def test_select_filter_corner(self):
|
3908 | 3861 |
|
|
0 commit comments