-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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
WillAyd
left a comment
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
| Shift direction. | ||
| 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
| """ | ||
| 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 pandasgit diff upstream/master -u -- "*.py" | flake8 --diffOutput of python scripts/validate_docstrings.py pandas.core.groupby.DataFrameGroupBy.shift: