File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -2044,7 +2044,7 @@ cdef class _Period(PeriodMixin):
2044
2044
2045
2045
See Also
2046
2046
--------
2047
- period.month : Get the month of the year for the given Period.
2047
+ period.month : Get the month of the year on the given Period.
2048
2048
period.day : Return the day of the month the Period falls on.
2049
2049
2050
2050
Notes
@@ -2060,10 +2060,9 @@ cdef class _Period(PeriodMixin):
2060
2060
2023
2061
2061
2062
2062
Create a Period object for 01 January 2023 and get the year:
2063
-
2064
2063
>>> period = pd.Period(' 2023' , ' D' )
2065
- >>> period.year
2066
- 2023
2064
+ >>> period.year
2065
+ 2023
2067
2066
2068
2067
Get the year for a period representing a quarter:
2069
2068
@@ -2074,13 +2073,13 @@ cdef class _Period(PeriodMixin):
2074
2073
Handle a case where the Period object is empty , which results in `NaN`:
2075
2074
2076
2075
>>> period = pd.Period(' nan' , ' M' )
2077
- >>> period.year
2076
+ >>> period.month
2078
2077
nan
2079
2078
2080
2079
Period object with an invalid format:
2081
2080
2082
2081
>>> period = pd.Period(' invalid' , ' M' )
2083
- # Will raise a DateParseError
2082
+ # Will raise an DateParseError
2084
2083
"""
2085
2084
base = self ._dtype._dtype_code
2086
2085
return pyear(self.ordinal , base )
You can’t perform that action at this time.
0 commit comments