pyspark.pandas.Index.T#
- property Index.T#
Return the transpose, For index, It will be index itself.
Examples
>>> idx = ps.Index(['a', 'b', 'c']) >>> idx Index(['a', 'b', 'c'], dtype='object')
>>> idx.transpose() Index(['a', 'b', 'c'], dtype='object')
For MultiIndex
>>> midx = ps.MultiIndex.from_tuples([('a', 'x'), ('b', 'y'), ('c', 'z')]) >>> midx MultiIndex([('a', 'x'), ('b', 'y'), ('c', 'z')], )
>>> midx.transpose() MultiIndex([('a', 'x'), ('b', 'y'), ('c', 'z')], )