-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DOC: Fixed ES01, PR07, SA04 error in pandas.core.groupby.DataFrameGroupBy.shift #32356
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
Conversation
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.
Thanks! A few minor edits
pandas/core/groupby/groupby.py
Outdated
fill_value : optional | ||
The scalar value to use for newly introduced missing values. | ||
The default depends on the dtype of *self*. |
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.
I think OK to remove this and the next 3 lines
pandas/core/groupby/groupby.py
Outdated
def shift(self, periods=1, freq=None, axis=0, fill_value=None): | ||
""" | ||
Shift each group by periods observations. | ||
|
||
When freq is not passed, shift the index without realigning the data. |
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.
I think should remove this first line (second is OK to keep)
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.
okay
pandas/core/groupby/groupby.py
Outdated
See Also | ||
-------- | ||
Index.shift : Shift values of Index. | ||
DatetimeIndex.resample : Shift values of DatetimeIndex. |
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.
Let's remove DatetimeIndex.resample and PeriodIndex.shift as neither are public (this docstring is)
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.
sure!
Great thanks @Iqrar99 ! |
You are welcome! 😸 |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
Output of python scripts/validate_docstrings.py pandas.core.groupby.DataFrameGroupBy.shift: