databricks.koalas.MultiIndex.copy

MultiIndex.copy(deep=None) → databricks.koalas.indexes.multi.MultiIndex[source]

Make a copy of this object.

Parameters
deepNone

this parameter is not supported but just dummy parameter to match pandas.

Examples

>>> df = ks.DataFrame([(.2, .3), (.0, .6), (.6, .0), (.2, .1)],
...                   columns=['dogs', 'cats'],
...                   index=[list('abcd'), list('efgh')])
>>> df['dogs'].index  
MultiIndex([('a', 'e'),
            ('b', 'f'),
            ('c', 'g'),
            ('d', 'h')],
           )

Copy index

>>> df.index.copy()  
MultiIndex([('a', 'e'),
            ('b', 'f'),
            ('c', 'g'),
            ('d', 'h')],
           )