diff --git a/pandas/_libs/tslibs/period.pyx b/pandas/_libs/tslibs/period.pyx index bef1956996b4f..350216cf89ce4 100644 --- a/pandas/_libs/tslibs/period.pyx +++ b/pandas/_libs/tslibs/period.pyx @@ -1752,9 +1752,6 @@ cdef class _Period(PeriodMixin): def __cinit__(self, int64_t ordinal, BaseOffset freq): self.ordinal = ordinal self.freq = freq - # Note: this is more performant than PeriodDtype.from_date_offset(freq) - # because from_date_offset cannot be made a cdef method (until cython - # supported cdef classmethods) self._dtype = PeriodDtypeBase(freq._period_dtype_code, freq.n) @classmethod @@ -1913,7 +1910,7 @@ cdef class _Period(PeriodMixin): Parameters ---------- - freq : str, BaseOffset + freq : str, DateOffset The target frequency to convert the Period object to. If a string is provided, it must be a valid :ref:`period alias `. @@ -2599,7 +2596,7 @@ cdef class _Period(PeriodMixin): Parameters ---------- - freq : str, BaseOffset + freq : str, DateOffset Frequency to use for the returned period. See Also