Skip to content

Commit c3068b3

Browse files
committed
CLN: Remove SparseList from pandas API
Deprecated in 0.19.0. xref pandas-devgh-14007.
1 parent 6e56195 commit c3068b3

File tree

7 files changed

+2
-281
lines changed

7 files changed

+2
-281
lines changed

doc/source/sparse.rst

-9
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,6 @@ can be converted back to a regular ndarray by calling ``to_dense``:
8585
8686
sparr.to_dense()
8787
88-
.. _sparse.list:
89-
90-
SparseList
91-
----------
92-
93-
The ``SparseList`` class has been deprecated and will be removed in a future version.
94-
See the `docs of a previous version <http://pandas.pydata.org/pandas-docs/version/0.18.1/sparse.html#sparselist>`__
95-
for documentation on ``SparseList``.
96-
9788
9889
SparseIndex objects
9990
-------------------

doc/source/whatsnew/v0.22.0.txt

+1
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ Removal of prior version deprecations/changes
136136
- ``pd.tseries.util.pivot_annual`` has been removed (deprecated since v0.19). Use ``pivot_table`` instead (:issue:`18370`)
137137
- ``pd.tseries.util.isleapyear`` has been removed (deprecated since v0.19). Use ``.is_leap_year`` property in Datetime-likes instead (:issue:`18370`)
138138
- ``pd.ordered_merge`` has been removed (deprecated since v0.19). Use ``pd.merge_ordered`` instead (:issue:`18459`)
139+
- The ``SparseList`` class has been removed (:issue:`14007`)
139140

140141
.. _whatsnew_0220.performance:
141142

pandas/core/sparse/api.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# pylint: disable=W0611
22
# flake8: noqa
33
from pandas.core.sparse.array import SparseArray
4-
from pandas.core.sparse.list import SparseList
54
from pandas.core.sparse.series import SparseSeries
65
from pandas.core.sparse.frame import SparseDataFrame

pandas/core/sparse/list.py

-152
This file was deleted.

pandas/tests/api/test_api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class TestPDApi(Base):
5252

5353
# these are already deprecated; awaiting removal
5454
deprecated_classes = ['WidePanel', 'Panel4D', 'TimeGrouper',
55-
'SparseList', 'Expr', 'Term']
55+
'Expr', 'Term']
5656

5757
# these should be deprecated in the future
5858
deprecated_classes_in_future = ['Panel']

pandas/tests/sparse/test_list.py

-111
This file was deleted.

pandas/util/testing.py

-7
Original file line numberDiff line numberDiff line change
@@ -1582,13 +1582,6 @@ def assert_sp_frame_equal(left, right, check_dtype=True, exact_indices=True,
15821582
for col in right:
15831583
assert (col in left)
15841584

1585-
1586-
def assert_sp_list_equal(left, right):
1587-
assert isinstance(left, pd.SparseList)
1588-
assert isinstance(right, pd.SparseList)
1589-
1590-
assert_sp_array_equal(left.to_array(), right.to_array())
1591-
15921585
# -----------------------------------------------------------------------------
15931586
# Others
15941587

0 commit comments

Comments
 (0)