pandas.Index.T# property Index.T[源代码]# 返回转置,其定义就是自身。 Examples 对于 Series: >>> s = pd.Series(['Ant', 'Bear', 'Cow']) >>> s 0 Ant 1 Bear 2 Cow dtype: object >>> s.T 0 Ant 1 Bear 2 Cow dtype: object 对于 Index: >>> idx = pd.Index([1, 2, 3]) >>> idx.T Index([1, 2, 3], dtype='int64')