Skip to content

Commit d5be44c

Browse files
committed
updates
1 parent b1d85ae commit d5be44c

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

doc/source/whatsnew/v1.2.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ See :ref:`install.dependencies` and :ref:`install.optional_dependencies` for mor
143143
Deprecations
144144
~~~~~~~~~~~~
145145
- Deprecated parameter ``inplace`` in :meth:`MultiIndex.set_codes` and :meth:`MultiIndex.set_levels` (:issue:`35626`)
146-
- Deprecated parameter ``dtype`` in :~meth:`Index.copy` on all index classes. Use :meth:`Index.astype` method (:issue:`35626`)
146+
- Deprecated parameter ``dtype`` in :~meth:`Index.copy` on all index classes. Use :meth:`Index.astype` method (:issue:`35853`)
147147
-
148148

149149
.. ---------------------------------------------------------------------------

pandas/core/indexes/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -824,8 +824,8 @@ def copy(self, name=None, deep=False, dtype=None, names=None):
824824

825825
if dtype:
826826
warnings.warn(
827-
"parameter dtype is deprecated and will be removed in a future version."
828-
" Use the astype method instead.",
827+
"parameter dtype is deprecated and will be removed in a future "
828+
"version. Use the astype method instead.",
829829
FutureWarning,
830830
stacklevel=2,
831831
)

pandas/core/indexes/multi.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1127,8 +1127,8 @@ def copy(
11271127

11281128
if dtype:
11291129
warnings.warn(
1130-
"parameter dtype is deprecated and will be removed in a future version."
1131-
" Use the astype method instead.",
1130+
"parameter dtype is deprecated and will be removed in a future "
1131+
"version. Use the astype method instead.",
11321132
FutureWarning,
11331133
stacklevel=2,
11341134
)

pandas/core/indexes/range.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ def copy(self, name=None, deep=False, dtype=None, names=None):
395395

396396
if dtype:
397397
warnings.warn(
398-
"parameter dtype is deprecated and will be removed in a future version."
399-
" Use the astype method instead.",
398+
"parameter dtype is deprecated and will be removed in a future "
399+
"version. Use the astype method instead.",
400400
FutureWarning,
401401
stacklevel=2,
402402
)

pandas/tests/indexes/common.py

+1
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ def test_copy_name2(self, index):
285285
index.copy(name=[["mario"]])
286286

287287
def test_copy_dtype_deprecated(self, index):
288+
# GH35853
288289
with tm.assert_produces_warning(FutureWarning, check_stacklevel=False):
289290
index.copy(dtype=object)
290291

0 commit comments

Comments
 (0)