pyspark.pandas.MultiIndex.append

MultiIndex.append(other: pyspark.pandas.indexes.base.Index) → pyspark.pandas.indexes.base.Index

Append a collection of Index options together.

Parameters
otherIndex
Returns
appendedIndex

Examples

>>> psidx = ps.Index([10, 5, 0, 5, 10, 5, 0, 10])
>>> psidx  
Int64Index([10, 5, 0, 5, 10, 5, 0, 10], dtype='int64')
>>> psidx.append(psidx)  
Int64Index([10, 5, 0, 5, 10, 5, 0, 10, 10, 5, 0, 5, 10, 5, 0, 10], dtype='int64')

Support for MiltiIndex

>>> psidx = ps.MultiIndex.from_tuples([('a', 'x'), ('b', 'y')])
>>> psidx  
MultiIndex([('a', 'x'),
            ('b', 'y')],
           )
>>> psidx.append(psidx)  
MultiIndex([('a', 'x'),
            ('b', 'y'),
            ('a', 'x'),
            ('b', 'y')],
           )