pandas.Index.to_series

Index.to_series(**kwargs)[source]

Create a Series with both index and values equal to the index keys useful with map for returning an indexer based on an index

Returns:Series : dtype will be based on the type of the Index values.
Scroll To Top