-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: update the Period.qyear docstring #20333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
4cc00bf
801e9b3
21ce297
799732f
d0c5102
fd47e6f
b5a9902
9a82c48
1973157
3104470
0510c71
9f03a90
73299d4
4c5697a
b66ede1
0013c64
ca3beb5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1408,6 +1408,24 @@ cdef class _Period(object): | |
|
||
@property | ||
def qyear(self): | ||
""" | ||
Get the year component of the Period. | ||
|
||
Returns | ||
------- | ||
int | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
See Also | ||
-------- | ||
Period.qyear :Return the year of the date | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add pqyear in See Also section There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you fix the spacing here? Space after the |
||
Period.pqyear : Return the year of the period | ||
|
||
Examples | ||
-------- | ||
>>> p = pd.Period("2014-9-21", freq="A") | ||
>>> p.qyear | ||
2014 | ||
""" | ||
base, mult = get_freq_code(self.freq) | ||
return pqyear(self.ordinal, base) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should differentiate
.qyear
from just.year