Table Of Contents

Search

Enter search terms or a module, class or function name.

pandas.Index.to_series

Index.to_series(index=None, name=None)[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

Parameters:

index : Index, optional

index of resulting Series. If None, defaults to original index

name : string, optional

name of resulting Series. If None, defaults to name of original index

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