File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -1963,7 +1963,6 @@ cdef class _Period(PeriodMixin):
1963
1963
>>> period = pd.Period(' 2023-08-01' , freq = ' W' )
1964
1964
>>> period.asfreq('D', how = ' end' )
1965
1965
Period('2023-08-04', 'D')
1966
-
1967
1966
"""
1968
1967
freq = self ._maybe_convert_freq(freq)
1969
1968
how = validate_end_alias(how)
@@ -2065,7 +2064,10 @@ cdef class _Period(PeriodMixin):
2065
2064
Period.year : Return the year this Period falls on.
2066
2065
Period.day : Return the day of the month this Period falls on.
2067
2066
2068
-
2067
+ Notes
2068
+ -----
2069
+ The month is determined based on the `ordinal` and `base` attributes of the Period.
2070
+
2069
2071
Examples
2070
2072
--------
2071
2073
Create a Period object for January 2022 and get the month:
@@ -2091,12 +2093,7 @@ cdef class _Period(PeriodMixin):
2091
2093
>>> period = pd.Period(' nan' , ' M' )
2092
2094
>>> period.month
2093
2095
nan
2094
-
2095
- Notes
2096
- -----
2097
- The month is determined based on the `ordinal` and `base` attributes of the Period.
2098
2096
"""
2099
-
2100
2097
base = self ._dtype._dtype_code
2101
2098
return pmonth(self.ordinal , base )
2102
2099
You can’t perform that action at this time.
0 commit comments