Skip to content

DOC : Update the pandas.Period.week docstring #20331

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

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions pandas/_libs/tslibs/period.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1305,6 +1305,24 @@ cdef class _Period(object):

@property
def week(self):
"""
Get the total weeks on the Period falls in.
Copy link
Contributor

@TomAugspurger TomAugspurger Mar 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Total weeks -> "week of the year"?

We'll want to keep an eye on #20324 for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Get the week of the year on the given Period"?

sure will check #20324

Copy link
Contributor

@TomAugspurger TomAugspurger Mar 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the summary?


Returns
-------
int

See Also
--------
Period.dayofweek : Get the day component of the Period.
Period.weekday : Get the day component of the Period.

Examples
--------
>>> p = pd.Period("2018-03-11")
>>> p.week
10
"""
return self.weekofyear

@property
Expand Down