xorbits.pandas.Index.copy#

Index.copy(name=None, deep=False)[源代码]#

Make a copy of this object.

Name is set on the new object.

参数
  • name (Label, optional) – Set name for new object.

  • deep (bool, default False) –

返回

Index refer to new object which is a copy of this object.

返回类型

Index

提示

In most cases, there should be no functional difference from using deep, but if deep is passed it will attempt to deepcopy.

实际案例

>>> idx = pd.Index(['a', 'b', 'c'])  
>>> new_idx = idx.copy()  
>>> idx is new_idx  
False

This docstring was copied from pandas.core.indexes.base.Index.