@@ -1645,7 +1645,7 @@ cdef class _Period:
16451645 """
16461646 freq = self ._maybe_convert_freq(freq)
16471647 how = validate_end_alias(how)
1648- base1 = self ._dtype.dtype_code
1648+ base1 = self ._dtype._dtype_code
16491649 base2 = freq_to_dtype_code(freq)
16501650
16511651 # self.n can't be negative or 0
@@ -1734,7 +1734,7 @@ cdef class _Period:
17341734 return endpoint - Timedelta(1, 'ns')
17351735
17361736 if freq is None:
1737- base = self ._dtype.dtype_code
1737+ base = self ._dtype._dtype_code
17381738 freq = get_to_timestamp_base(base)
17391739 base = freq
17401740 else:
@@ -1748,12 +1748,12 @@ cdef class _Period:
17481748
17491749 @property
17501750 def year(self ) -> int:
1751- base = self ._dtype.dtype_code
1751+ base = self ._dtype._dtype_code
17521752 return pyear(self.ordinal , base )
17531753
17541754 @property
17551755 def month(self ) -> int:
1756- base = self ._dtype.dtype_code
1756+ base = self ._dtype._dtype_code
17571757 return pmonth(self.ordinal , base )
17581758
17591759 @property
@@ -1776,7 +1776,7 @@ cdef class _Period:
17761776 >>> p.day
17771777 11
17781778 """
1779- base = self ._dtype.dtype_code
1779+ base = self ._dtype._dtype_code
17801780 return pday(self.ordinal , base )
17811781
17821782 @property
@@ -1806,7 +1806,7 @@ cdef class _Period:
18061806 >>> p.hour
18071807 0
18081808 """
1809- base = self ._dtype.dtype_code
1809+ base = self ._dtype._dtype_code
18101810 return phour(self.ordinal , base )
18111811
18121812 @property
@@ -1830,7 +1830,7 @@ cdef class _Period:
18301830 >>> p.minute
18311831 3
18321832 """
1833- base = self ._dtype.dtype_code
1833+ base = self ._dtype._dtype_code
18341834 return pminute(self.ordinal , base )
18351835
18361836 @property
@@ -1854,12 +1854,12 @@ cdef class _Period:
18541854 >>> p.second
18551855 12
18561856 """
1857- base = self ._dtype.dtype_code
1857+ base = self ._dtype._dtype_code
18581858 return psecond(self.ordinal , base )
18591859
18601860 @property
18611861 def weekofyear(self ) -> int:
1862- base = self ._dtype.dtype_code
1862+ base = self ._dtype._dtype_code
18631863 return pweek(self.ordinal , base )
18641864
18651865 @property
@@ -1940,7 +1940,7 @@ cdef class _Period:
19401940 >>> per.end_time.dayofweek
19411941 2
19421942 """
1943- base = self ._dtype.dtype_code
1943+ base = self ._dtype._dtype_code
19441944 return pweekday(self.ordinal , base )
19451945
19461946 @property
@@ -2028,12 +2028,12 @@ cdef class _Period:
20282028 >>> period.dayofyear
20292029 1
20302030 """
2031- base = self ._dtype.dtype_code
2031+ base = self ._dtype._dtype_code
20322032 return pday_of_year(self.ordinal , base )
20332033
20342034 @property
20352035 def quarter(self ) -> int:
2036- base = self ._dtype.dtype_code
2036+ base = self ._dtype._dtype_code
20372037 return pquarter(self.ordinal , base )
20382038
20392039 @property
@@ -2077,7 +2077,7 @@ cdef class _Period:
20772077 >>> per.year
20782078 2017
20792079 """
2080- base = self ._dtype.dtype_code
2080+ base = self ._dtype._dtype_code
20812081 return pqyear(self.ordinal , base )
20822082
20832083 @property
@@ -2111,7 +2111,7 @@ cdef class _Period:
21112111 >>> p.days_in_month
21122112 29
21132113 """
2114- base = self ._dtype.dtype_code
2114+ base = self ._dtype._dtype_code
21152115 return pdays_in_month(self.ordinal , base )
21162116
21172117 @property
@@ -2149,15 +2149,15 @@ cdef class _Period:
21492149 return self.freq.freqstr
21502150
21512151 def __repr__(self ) -> str:
2152- base = self ._dtype.dtype_code
2152+ base = self ._dtype._dtype_code
21532153 formatted = period_format(self .ordinal, base)
21542154 return f"Period('{formatted}', '{self.freqstr}')"
21552155
21562156 def __str__(self ) -> str:
21572157 """
21582158 Return a string representation for a particular DataFrame
21592159 """
2160- base = self ._dtype.dtype_code
2160+ base = self ._dtype._dtype_code
21612161 formatted = period_format(self .ordinal, base)
21622162 value = str (formatted)
21632163 return value
@@ -2309,7 +2309,7 @@ cdef class _Period:
23092309 >>> a.strftime('%b. %d , %Y was a %A')
23102310 'Jan. 01, 2001 was a Monday'
23112311 """
2312- base = self ._dtype.dtype_code
2312+ base = self ._dtype._dtype_code
23132313 return period_format(self.ordinal , base , fmt )
23142314
23152315
0 commit comments