Skip to content

Commit

Permalink
CLN: Remove SparseList from pandas API (#18621)
Browse files Browse the repository at this point in the history
Deprecated in 0.19.0.

xref gh-14007.
  • Loading branch information
gfyoung authored and jreback committed Dec 4, 2017
1 parent aa5b6e6 commit 5bf9486
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 281 deletions.
9 changes: 0 additions & 9 deletions doc/source/sparse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,6 @@ can be converted back to a regular ndarray by calling ``to_dense``:
sparr.to_dense()
.. _sparse.list:

SparseList
----------

The ``SparseList`` class has been deprecated and will be removed in a future version.
See the `docs of a previous version <http://pandas.pydata.org/pandas-docs/version/0.18.1/sparse.html#sparselist>`__
for documentation on ``SparseList``.

SparseIndex objects
-------------------
Expand Down
1 change: 1 addition & 0 deletions doc/source/whatsnew/v0.22.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ Removal of prior version deprecations/changes
- ``pd.tseries.util.pivot_annual`` has been removed (deprecated since v0.19). Use ``pivot_table`` instead (:issue:`18370`)
- ``pd.tseries.util.isleapyear`` has been removed (deprecated since v0.19). Use ``.is_leap_year`` property in Datetime-likes instead (:issue:`18370`)
- ``pd.ordered_merge`` has been removed (deprecated since v0.19). Use ``pd.merge_ordered`` instead (:issue:`18459`)
- The ``SparseList`` class has been removed (:issue:`14007`)

.. _whatsnew_0220.performance:

Expand Down
1 change: 0 additions & 1 deletion pandas/core/sparse/api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# pylint: disable=W0611
# flake8: noqa
from pandas.core.sparse.array import SparseArray
from pandas.core.sparse.list import SparseList
from pandas.core.sparse.series import SparseSeries
from pandas.core.sparse.frame import SparseDataFrame
152 changes: 0 additions & 152 deletions pandas/core/sparse/list.py

This file was deleted.

2 changes: 1 addition & 1 deletion pandas/tests/api/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class TestPDApi(Base):

# these are already deprecated; awaiting removal
deprecated_classes = ['WidePanel', 'Panel4D', 'TimeGrouper',
'SparseList', 'Expr', 'Term']
'Expr', 'Term']

# these should be deprecated in the future
deprecated_classes_in_future = ['Panel']
Expand Down
111 changes: 0 additions & 111 deletions pandas/tests/sparse/test_list.py

This file was deleted.

7 changes: 0 additions & 7 deletions pandas/util/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1582,13 +1582,6 @@ def assert_sp_frame_equal(left, right, check_dtype=True, exact_indices=True,
for col in right:
assert (col in left)


def assert_sp_list_equal(left, right):
assert isinstance(left, pd.SparseList)
assert isinstance(right, pd.SparseList)

assert_sp_array_equal(left.to_array(), right.to_array())

# -----------------------------------------------------------------------------
# Others

Expand Down

0 comments on commit 5bf9486

Please sign in to comment.