IndexVariable.copy(deep=True, data=None)[source]#

Returns a copy of this object.

deep is ignored since data is stored in the form of pandas.Index, which is already immutable. Dimensions, attributes and encodings are always copied.

Use data to create a new object with the same structure as original but entirely new data.

  • deep (bool, default: True) – Deep is ignored when data is given. Whether the data array is loaded into memory and copied onto the new object. Default is True.

  • data (array_like, optional) – Data to use in the new object. Must have same shape as original.


object (Variable) – New object with dimensions, attributes, encodings, and optionally data copied from original.