pyspark.pandas.Index.append#
- Index.append(other)[source]#
Append a collection of Index options together.
- Parameters
- otherIndex
- Returns
- appendedIndex
Examples
>>> psidx = ps.Index([10, 5, 0, 5, 10, 5, 0, 10]) >>> psidx Index([10, 5, 0, 5, 10, 5, 0, 10], dtype='int64')
>>> psidx.append(psidx) Index([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')], )