Skip to content

Commit

Permalink
update warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
jschendel committed May 21, 2019
1 parent b03eadd commit 77f171d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions doc/source/whatsnew/v0.25.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ Deprecations
- The :meth:`DataFrame.compound` and :meth:`Series.compound` methods are deprecated and will be removed in a future version.
- The default value ``ordered=None`` in :class:`~pandas.api.types.CategoricalDtype` has been deprecated in favor of ``ordered=False``. When converting between categorical types ``ordered=True`` must be explicitly passed in order to be preserved. (:issue:`26336`)


.. _whatsnew_0250.prior_deprecations:

Removal of prior version deprecations/changes
Expand Down
6 changes: 4 additions & 2 deletions pandas/core/dtypes/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,10 @@ def update_dtype(self, dtype):
if new_ordered is None:
new_ordered = self.ordered
if self.ordered:
msg = ("ordered=None is deprecated and will default to False "
"in a future version; ordered=True must be explicitly "
msg = ("Constructing a CategoricalDtype without specifying "
"`ordered` or explicitly passing `ordered=None` is "
"deprecated and will default to `ordered=False` in a "
"future version; `ordered=True` must be explicitly "
"passed in order to be retained")
warnings.warn(msg, FutureWarning, stacklevel=3)

Expand Down

0 comments on commit 77f171d

Please sign in to comment.