MultiIndex.
to_series
Create a Series with both index and values equal to the index keys useful with map for returning an indexer based on an index.
name of resulting Series. If None, defaults to name of original index
Examples
>>> df = ps.DataFrame([(.2, .3), (.0, .6), (.6, .0), (.2, .1)], ... columns=['dogs', 'cats'], ... index=list('abcd')) >>> df['dogs'].index.to_series() a a b b c c d d dtype: object