Skip to content

Commit c61a811

Browse files
committed
move plotting to privacy in docs
1 parent e329c1e commit c61a811

File tree

6 files changed

+41
-40
lines changed

6 files changed

+41
-40
lines changed

doc/source/whatsnew/v0.20.0.txt

+26-26
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Highlights include:
2121
- Support for S3 handling now uses ``s3fs``, see :ref:`here <whatsnew_0200.api_breaking.s3>`
2222
- Google BigQuery support now uses the ``pandas-gbq`` library, see :ref:`here <whatsnew_0200.api_breaking.gbq>`
2323
- Switched the test framework to use `pytest <http://doc.pytest.org/en/latest>`__ (:issue:`13097`)
24-
- The ``pandas.tools.plotting`` module has been deprecated, moved to ``pandas.plotting``. See :ref:`here <whatsnew_0200.api_breaking.plotting>`
24+
- The ``pandas.tools.plotting`` module has been deprecated, moved to ``pandas.plotting``. See :ref:`here <whatsnew_0200.privacy.plotting>`
2525

2626

2727
Check the :ref:`API Changes <whatsnew_0200.api_breaking>` and :ref:`deprecations <whatsnew_0200.deprecations>` before updating.
@@ -558,31 +558,6 @@ Using ``.iloc``. Here we will get the location of the 'A' column, then use *posi
558558
df.iloc[[0, 2], df.columns.get_loc('A')]
559559

560560

561-
.. _whatsnew_0200.api_breaking.deprecate_plotting
562-
563-
Deprecate .plotting
564-
^^^^^^^^^^^^^^^^^^^
565-
566-
The ``pandas.tools.plotting`` module has been deprecated, in favor of the top level ``pandas.plotting`` module. All the public plotting functions are now available
567-
from ``pandas.plotting`` (:issue:`12548`).
568-
569-
Furthermore, the top-level ``pandas.scatter_matrix`` and ``pandas.plot_params`` are deprecated.
570-
Users can import these from ``pandas.plotting`` as well.
571-
572-
Previous script:
573-
574-
.. code-block:: python
575-
576-
pd.tools.plotting.scatter_matrix(df)
577-
pd.scatter_matrix(df)
578-
579-
Should be changed to:
580-
581-
.. code-block:: python
582-
583-
pd.plotting.scatter_matrix(df)
584-
585-
586561
.. _whatsnew_0200.api_breaking.deprecate_panel:
587562

588563
Deprecate Panel
@@ -1365,6 +1340,31 @@ If indicated, a deprecation warning will be issued if you reference that module.
13651340

13661341
- The function :func:`~pandas.api.type.union_categoricals` is now importable from ``pandas.api.types``, formerly from ``pandas.types.concat`` (:issue:`15998`)
13671342

1343+
.. _whatsnew_0200.privacy.deprecate_plotting
1344+
1345+
Deprecate .plotting
1346+
^^^^^^^^^^^^^^^^^^^
1347+
1348+
The ``pandas.tools.plotting`` module has been deprecated, in favor of the top level ``pandas.plotting`` module. All the public plotting functions are now available
1349+
from ``pandas.plotting`` (:issue:`12548`).
1350+
1351+
Furthermore, the top-level ``pandas.scatter_matrix`` and ``pandas.plot_params`` are deprecated.
1352+
Users can import these from ``pandas.plotting`` as well.
1353+
1354+
Previous script:
1355+
1356+
.. code-block:: python
1357+
1358+
pd.tools.plotting.scatter_matrix(df)
1359+
pd.scatter_matrix(df)
1360+
1361+
Should be changed to:
1362+
1363+
.. code-block:: python
1364+
1365+
pd.plotting.scatter_matrix(df)
1366+
1367+
13681368
.. _whatsnew_0200.privacy.development:
13691369

13701370
Other Developement Changes

pandas/plotting/_converter.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
from matplotlib.transforms import nonsingular
1212

1313

14-
from pandas.types.common import (is_float, is_integer,
15-
is_integer_dtype,
16-
is_float_dtype,
17-
is_datetime64_ns_dtype,
18-
is_period_arraylike,
19-
)
14+
from pandas.core.dtypes.common import (
15+
is_float, is_integer,
16+
is_integer_dtype,
17+
is_float_dtype,
18+
is_datetime64_ns_dtype,
19+
is_period_arraylike)
2020

2121
from pandas.compat import lrange
2222
import pandas.compat as compat

pandas/plotting/_core.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
1111

1212
from pandas.util.decorators import cache_readonly
1313
from pandas.core.base import PandasObject
14-
from pandas.types.common import (is_list_like,
15-
is_integer,
16-
is_number,
17-
is_hashable,
18-
is_iterator)
14+
from pandas.core.dtypes.common import (
15+
is_list_like,
16+
is_integer,
17+
is_number,
18+
is_hashable,
19+
is_iterator)
1920
from pandas.core.common import AbstractMethodError, isnull, _try_sort
2021
from pandas.core.generic import _shared_docs, _shared_doc_kwargs
2122
from pandas.core.index import Index, MultiIndex

pandas/plotting/_misc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import numpy as np
66

77
from pandas.util.decorators import deprecate_kwarg
8-
from pandas.types.missing import notnull
8+
from pandas.core.dtypes.missing import notnull
99
from pandas.compat import range, lrange, lmap, zip
1010
from pandas.formats.printing import pprint_thing
1111

pandas/plotting/_style.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import numpy as np
1010

11-
from pandas.types.common import is_list_like
11+
from pandas.core.dtypes.common import is_list_like
1212
from pandas.compat import range, lrange, lmap
1313
import pandas.compat as compat
1414
from pandas.plotting._compat import _mpl_ge_2_0_0

pandas/plotting/_tools.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import numpy as np
99

10-
from pandas.types.common import is_list_like
10+
from pandas.core.dtypes.common import is_list_like
1111
from pandas.core.index import Index
1212
from pandas.core.series import Series
1313
from pandas.compat import range

0 commit comments

Comments
 (0)