Skip to content

Commit f5982d4

Browse files
committed
Update copy docstring in Index constructor
1 parent 974bc2a commit f5982d4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pandas/core/indexes/base.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,13 @@ class Index(IndexOpsMixin, PandasObject):
341341
Data type for the output Index. If not specified, this will be
342342
inferred from `data`.
343343
See the :ref:`user guide <basics.dtypes>` for more usages.
344-
copy : bool, default False
345-
Copy input data.
344+
copy : bool, default None
345+
Whether to copy input data, only relevant for array, Series, and Index
346+
inputs (for other input, e.g. a list, a new array is created anyway).
347+
Defaults to True for array input and False for Index/Series.
348+
Set to False to avoid copying array input at your own risk (if you
349+
know the input data won't be modified elsewhere).
350+
Set to True to force copying Series/Index input up front.
346351
name : object
347352
Name to be stored in the index.
348353
tupleize_cols : bool (default: True)

0 commit comments

Comments
 (0)