def to_series(self, **kwargs):

        from pandas import Series
        return Series(self._to_embed(), index=self, name=self.name)
Create a Series with both index and values equal to the index keys
dataset/ETHPy150Open pydata/pandas/pandas/indexes/base.py/Index.to_series