def to_period(self, freq=None, copy=True):
        new_values = self._values
        if copy:
            new_values = new_values.copy()

        new_index = self.index.to_period(freq=freq)
        return self._constructor(new_values,
                                 index=new_index).__finalize__(self)

    # -------------------------------------------------------------------------
    # Datetimelike delegation methods
Convert Series from DatetimeIndex to PeriodIndex with desired
dataset/ETHPy150Open pydata/pandas/pandas/core/series.py/Series.to_period