Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions pandas/_libs/tslibs/period.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 <timeseries.period_aliases>`.
Expand Down Expand Up @@ -2599,7 +2596,7 @@ cdef class _Period(PeriodMixin):

Parameters
----------
freq : str, BaseOffset
freq : str, DateOffset
Frequency to use for the returned period.

See Also
Expand Down
Loading