Skip to content

Commit

Permalink
CLN: Remove pandas.tools module
Browse files Browse the repository at this point in the history
xref gh-15358.
xref gh-16005.
  • Loading branch information
gfyoung committed Oct 27, 2018
1 parent caea25a commit 374bae0
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 115 deletions.
1 change: 1 addition & 0 deletions doc/source/whatsnew/v0.24.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,7 @@ Removal of prior version deprecations/changes
- :meth:`Categorical.searchsorted` and :meth:`Series.searchsorted` have renamed the ``v`` argument to ``value`` (:issue:`14645`)
- :meth:`TimedeltaIndex.searchsorted`, :meth:`DatetimeIndex.searchsorted`, and :meth:`PeriodIndex.searchsorted` have renamed the ``key`` argument to ``value`` (:issue:`14645`)
- Removal of the previously deprecated module ``pandas.json`` (:issue:`19944`)
- The module ``pandas.tools`` has been removed (:issue:`15358`, :issue:`16005`)
- :meth:`SparseArray.get_values` and :meth:`SparseArray.to_dense` have dropped the ``fill`` parameter (:issue:`14686`)
- :meth:`SparseSeries.to_dense` has dropped the ``sparse_only`` parameter (:issue:`14686`)

Expand Down
8 changes: 0 additions & 8 deletions pandas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,6 @@
from pandas.core.computation.api import *
from pandas.core.reshape.api import *

# deprecate tools.plotting, plot_params and scatter_matrix on the top namespace
import pandas.tools.plotting
plot_params = pandas.plotting._style._Options(deprecated=True)
# do not import deprecate to top namespace
scatter_matrix = pandas.util._decorators.deprecate(
'pandas.scatter_matrix', pandas.plotting.scatter_matrix, '0.20.0',
'pandas.plotting.scatter_matrix')

from pandas.util._print_versions import show_versions
from pandas.io.api import *
from pandas.util._tester import test
Expand Down
10 changes: 0 additions & 10 deletions pandas/plotting/_style.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,22 +110,14 @@ def __init__(self, deprecated=False):
# self['xaxis.compat'] = False
super(_Options, self).__setitem__('xaxis.compat', False)

def _warn_if_deprecated(self):
if self._deprecated:
warnings.warn("'pandas.plot_params' is deprecated. Use "
"'pandas.plotting.plot_params' instead",
FutureWarning, stacklevel=3)

def __getitem__(self, key):
self._warn_if_deprecated()
key = self._get_canonical_key(key)
if key not in self:
raise ValueError(
'{key} is not a valid pandas plotting option'.format(key=key))
return super(_Options, self).__getitem__(key)

def __setitem__(self, key, value):
self._warn_if_deprecated()
key = self._get_canonical_key(key)
return super(_Options, self).__setitem__(key, value)

Expand All @@ -148,7 +140,6 @@ def reset(self):
-------
None
"""
self._warn_if_deprecated()
self.__init__()

def _get_canonical_key(self, key):
Expand All @@ -160,7 +151,6 @@ def use(self, key, value):
Temporarily set a parameter value using the with statement.
Aliasing allowed.
"""
self._warn_if_deprecated()
old_value = self[key]
try:
self[key] = value
Expand Down
5 changes: 2 additions & 3 deletions pandas/tests/api/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class TestPDApi(Base):

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

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

# these are already deprecated; awaiting removal
deprecated_funcs = ['pnow', 'match', 'groupby', 'get_store',
'plot_params', 'scatter_matrix']
deprecated_funcs = ['pnow', 'match', 'groupby', 'get_store']

def test_api(self):

Expand Down
57 changes: 0 additions & 57 deletions pandas/tests/plotting/test_deprecated.py

This file was deleted.

Empty file removed pandas/tools/__init__.py
Empty file.
17 changes: 0 additions & 17 deletions pandas/tools/merge.py

This file was deleted.

20 changes: 0 additions & 20 deletions pandas/tools/plotting.py

This file was deleted.

0 comments on commit 374bae0

Please sign in to comment.