-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
DOC: update the pandas.Series.dt.is_quarter_end docstring #20279
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
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 |
---|---|---|
|
@@ -1739,7 +1739,33 @@ def freq(self, value): | |
is_quarter_end = _field_accessor( | ||
'is_quarter_end', | ||
'is_quarter_end', | ||
"Logical indicating if last day of quarter (defined by frequency)") | ||
""" | ||
Return a boolean indicating whether the date is the last day of a | ||
quarter. | ||
|
||
Returns | ||
------- | ||
is_quarter_end : Series of boolean. | ||
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 | ||
-------- | ||
quarter : Return the quarter 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. |
||
|
||
is_quarter_start : Return a boolean indicating whether the date is the | ||
first day of the quarter. | ||
|
||
Examples | ||
-------- | ||
>>> df = pd.DataFrame({'dates': pd.date_range("2017-03-30", | ||
... periods=4)}) | ||
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. PEP: indent periods under the quote in |
||
>>> df.assign(quarter = df.dates.dt.quarter, | ||
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'd say no spaces around the |
||
... is_quarter_end = df.dates.dt.is_quarter_end) | ||
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. PEP8: one more space |
||
dates quarter is_quarter_end | ||
0 2017-03-30 1 False | ||
1 2017-03-31 1 True | ||
2 2017-04-01 2 False | ||
3 2017-04-02 2 False | ||
""") | ||
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. Example for DatetimeIndex |
||
is_year_start = _field_accessor( | ||
'is_year_start', | ||
'is_year_start', | ||
|
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.
See if you can reprhase to get this on a single line