Skip to content

Commit d8115ce

Browse files
authored
DOC: Fix pandas.index.copy summary documentation (#32006)
1 parent e6bd49f commit d8115ce

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pandas/core/indexes/base.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -796,20 +796,24 @@ def repeat(self, repeats, axis=None):
796796

797797
def copy(self, name=None, deep=False, dtype=None, names=None):
798798
"""
799-
Make a copy of this object. Name and dtype sets those attributes on
800-
the new object.
799+
Make a copy of this object.
800+
801+
Name and dtype sets those attributes on the new object.
801802
802803
Parameters
803804
----------
804-
name : Label
805+
name : Label, optional
806+
Set name for new object.
805807
deep : bool, default False
806808
dtype : numpy dtype or pandas type, optional
809+
Set dtype for new object.
807810
names : list-like, optional
808811
Kept for compatibility with MultiIndex. Should not be used.
809812
810813
Returns
811814
-------
812815
Index
816+
Index refer to new object which is a copy of this object.
813817
814818
Notes
815819
-----

0 commit comments

Comments
 (0)