def to_frame(self, name=None):
        if name is None:
            df = self._constructor_expanddim(self)
        else:
            df = self._constructor_expanddim({name: self})

        return df
Convert Series to DataFrame
dataset/ETHPy150Open pydata/pandas/pandas/core/series.py/Series.to_frame