Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 374bae0

Browse files
committedOct 27, 2018
CLN: Remove pandas.tools module
xref gh-15358. xref gh-16005.
1 parent caea25a commit 374bae0

File tree

8 files changed

+3
-115
lines changed

8 files changed

+3
-115
lines changed
 

Diff for: ‎doc/source/whatsnew/v0.24.0.txt

+1
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,7 @@ Removal of prior version deprecations/changes
946946
- :meth:`Categorical.searchsorted` and :meth:`Series.searchsorted` have renamed the ``v`` argument to ``value`` (:issue:`14645`)
947947
- :meth:`TimedeltaIndex.searchsorted`, :meth:`DatetimeIndex.searchsorted`, and :meth:`PeriodIndex.searchsorted` have renamed the ``key`` argument to ``value`` (:issue:`14645`)
948948
- Removal of the previously deprecated module ``pandas.json`` (:issue:`19944`)
949+
- The module ``pandas.tools`` has been removed (:issue:`15358`, :issue:`16005`)
949950
- :meth:`SparseArray.get_values` and :meth:`SparseArray.to_dense` have dropped the ``fill`` parameter (:issue:`14686`)
950951
- :meth:`SparseSeries.to_dense` has dropped the ``sparse_only`` parameter (:issue:`14686`)
951952

Diff for: ‎pandas/__init__.py

-8
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,6 @@
4545
from pandas.core.computation.api import *
4646
from pandas.core.reshape.api import *
4747

48-
# deprecate tools.plotting, plot_params and scatter_matrix on the top namespace
49-
import pandas.tools.plotting
50-
plot_params = pandas.plotting._style._Options(deprecated=True)
51-
# do not import deprecate to top namespace
52-
scatter_matrix = pandas.util._decorators.deprecate(
53-
'pandas.scatter_matrix', pandas.plotting.scatter_matrix, '0.20.0',
54-
'pandas.plotting.scatter_matrix')
55-
5648
from pandas.util._print_versions import show_versions
5749
from pandas.io.api import *
5850
from pandas.util._tester import test

Diff for: ‎pandas/plotting/_style.py

-10
Original file line numberDiff line numberDiff line change
@@ -110,22 +110,14 @@ def __init__(self, deprecated=False):
110110
# self['xaxis.compat'] = False
111111
super(_Options, self).__setitem__('xaxis.compat', False)
112112

113-
def _warn_if_deprecated(self):
114-
if self._deprecated:
115-
warnings.warn("'pandas.plot_params' is deprecated. Use "
116-
"'pandas.plotting.plot_params' instead",
117-
FutureWarning, stacklevel=3)
118-
119113
def __getitem__(self, key):
120-
self._warn_if_deprecated()
121114
key = self._get_canonical_key(key)
122115
if key not in self:
123116
raise ValueError(
124117
'{key} is not a valid pandas plotting option'.format(key=key))
125118
return super(_Options, self).__getitem__(key)
126119

127120
def __setitem__(self, key, value):
128-
self._warn_if_deprecated()
129121
key = self._get_canonical_key(key)
130122
return super(_Options, self).__setitem__(key, value)
131123

@@ -148,7 +140,6 @@ def reset(self):
148140
-------
149141
None
150142
"""
151-
self._warn_if_deprecated()
152143
self.__init__()
153144

154145
def _get_canonical_key(self, key):
@@ -160,7 +151,6 @@ def use(self, key, value):
160151
Temporarily set a parameter value using the with statement.
161152
Aliasing allowed.
162153
"""
163-
self._warn_if_deprecated()
164154
old_value = self[key]
165155
try:
166156
self[key] = value

Diff for: ‎pandas/tests/api/test_api.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class TestPDApi(Base):
3030

3131
# top-level sub-packages
3232
lib = ['api', 'compat', 'core', 'errors', 'pandas',
33-
'plotting', 'test', 'testing', 'tools', 'tseries',
33+
'plotting', 'test', 'testing', 'tseries',
3434
'util', 'options', 'io']
3535

3636
# these are already deprecated; awaiting removal
@@ -89,8 +89,7 @@ class TestPDApi(Base):
8989
deprecated_funcs_in_future = []
9090

9191
# these are already deprecated; awaiting removal
92-
deprecated_funcs = ['pnow', 'match', 'groupby', 'get_store',
93-
'plot_params', 'scatter_matrix']
92+
deprecated_funcs = ['pnow', 'match', 'groupby', 'get_store']
9493

9594
def test_api(self):
9695

Diff for: ‎pandas/tests/plotting/test_deprecated.py

-57
This file was deleted.

Diff for: ‎pandas/tools/__init__.py

Whitespace-only changes.

Diff for: ‎pandas/tools/merge.py

-17
This file was deleted.

Diff for: ‎pandas/tools/plotting.py

-20
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.