-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC : update the pandas.Period.weekday docstring #20413
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 1 commit
c9282d7
45a7754
82084bf
eaf6c77
fcaaf4b
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 |
---|---|---|
|
@@ -1416,6 +1416,32 @@ cdef class _Period(object): | |
|
||
@property | ||
def weekday(self): | ||
""" | ||
Get day of the week that a Period falls on. | ||
|
||
Returns | ||
------- | ||
int | ||
|
||
See Also | ||
-------- | ||
Period.dayofweek : Get the day component of the Period. | ||
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. From the description, I can't see the difference between 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. yup sure 👍 |
||
Period.week : Get the week of the year on the given Period. | ||
|
||
Examples | ||
-------- | ||
>>> p = pd.Period("2018-03-11", "H") | ||
>>> p.weekday | ||
6 | ||
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. I think the examples give the idea that a And also, or here or in the summary, give more details on which day of the week of the 3 months period is being returned. |
||
|
||
>>> p = pd.Period("2018-02-01", "D") | ||
>>> p.weekday | ||
3 | ||
|
||
>>> p = pd.Period("2018-01-06", "D") | ||
>>> p.weekday | ||
5 | ||
""" | ||
return self.dayofweek | ||
|
||
@property | ||
|
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.
As this is a property and not a function, no need to start with a verb, you can start with "Day of the week...".
Also, as
Period
here is the pandas object, you can use backticks to highlight it.I think in the extended summary you could explain that
0
meansMonday
...