Skip to content

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

Merged
merged 3 commits into from
Mar 2, 2020
Merged

Conversation

Iqrar99
Copy link
Contributor

@Iqrar99 Iqrar99 commented Feb 29, 2020

Output of python scripts/validate_docstrings.py pandas.core.groupby.DataFrameGroupBy.shift:

################################################################################
################################## Validation ##################################
################################################################################

1 Errors found:
        No examples section found

@Iqrar99 Iqrar99 changed the title Fixed PR07 error in pandas.core.groupby.DataFrameGroupBy.shift DOC: Fixed PR07 error in pandas.core.groupby.DataFrameGroupBy.shift Feb 29, 2020
@Iqrar99 Iqrar99 changed the title DOC: Fixed PR07 error in pandas.core.groupby.DataFrameGroupBy.shift DOC: Fixed ES01, PR07, SA04 error in pandas.core.groupby.DataFrameGroupBy.shift Feb 29, 2020
Copy link
Member

@WillAyd WillAyd left a 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

fill_value : optional
The scalar value to use for newly introduced missing values.
The default depends on the dtype of *self*.
Copy link
Member

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

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.
Copy link
Member

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay

See Also
--------
Index.shift : Shift values of Index.
DatetimeIndex.resample : Shift values of DatetimeIndex.
Copy link
Member

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure!

@Iqrar99 Iqrar99 requested a review from WillAyd March 1, 2020 12:26
@WillAyd WillAyd added this to the 1.1 milestone Mar 2, 2020
@WillAyd WillAyd merged commit 78c1a74 into pandas-dev:master Mar 2, 2020
@WillAyd
Copy link
Member

WillAyd commented Mar 2, 2020

Great thanks @Iqrar99 !

roberthdevries pushed a commit to roberthdevries/pandas that referenced this pull request Mar 2, 2020
@Iqrar99 Iqrar99 deleted the patch-2 branch March 3, 2020 14:26
@Iqrar99
Copy link
Contributor Author

Iqrar99 commented Mar 3, 2020

You are welcome! 😸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants