Skip to content

DOC: Fixing EX01 - Added examples #53948

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 9 commits into from
Jul 5, 2023
Merged

Conversation

DeaMariaLeon
Copy link
Member

Towards #37875

@DeaMariaLeon DeaMariaLeon requested a review from mroeschke as a code owner June 30, 2023 15:10
@DeaMariaLeon DeaMariaLeon added this to the 2.1 milestone Jun 30, 2023
@github-actions
Copy link
Contributor

No preview found for PR #53948. Did the docs build complete?

@DeaMariaLeon
Copy link
Member Author

/preview

@github-actions
Copy link
Contributor

Website preview of this PR available at: https://pandas.pydata.org/preview/53948/

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

nice - looks like there's a failing doctest though

@DeaMariaLeon
Copy link
Member Author

This last fail doesn't look like it's related to the example.

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

examples look great, well done figuring out all these docstring substitutions

just got a comment on the replace, which I think doesn't need to be there

@DeaMariaLeon
Copy link
Member Author

Thank you

Comment on lines 27 to 30
pandas.Series.{window_method} : Calling {window_method} with Series data.
pandas.DataFrame.{window_method} : Calling {window_method} with DataFrames.
pandas.Series.{agg_method} : Aggregating {agg_method} for Series.
pandas.DataFrame.{agg_method} : Aggregating {agg_method} for DataFrame.\n
Series.{window_method} : Calling {window_method} with Series data.
DataFrame.{window_method} : Calling {window_method} with DataFrames.
Series.{agg_method} : Aggregating {agg_method} for Series.
DataFrame.{agg_method} : Aggregating {agg_method} for DataFrame.\n
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll put them back. It was to get rid of these errors after running validate_docstirngs.py:

        pandas.Series.rolling in `See Also` section does not need `pandas` prefix, use Series.rolling instead.
        pandas.DataFrame.rolling in `See Also` section does not need `pandas` prefix, use DataFrame.rolling instead.
        pandas.Series.max in `See Also` section does not need `pandas` prefix, use Series.max instead.
        pandas.DataFrame.max in `See Also` section does not need `pandas` prefix, use DataFrame.max instead.

But I did forget to see the preview again, sorry.

Copy link
Member

Choose a reason for hiding this comment

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

thanks! I'll check again once the new preview renders. this may be a bug in validate_docstrings unfortunately

"""
A minimum of three periods is required for the rolling calculation.\n
"""
).replace("\n", "", 1),
Copy link
Member

Choose a reason for hiding this comment

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

can we remove this replace too?

Copy link
Member Author

Choose a reason for hiding this comment

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

ouch - sure.
FYI .replace("\n", "", 1) is still 23 times on that rolling.py file. It was there before I touched the file. That is why I did the same.
It's 16 times on expanding.py (before my changes).

Copy link
Member

Choose a reason for hiding this comment

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

ah I see, thanks - maybe we can remove the rest as part of a separate PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure

@DeaMariaLeon
Copy link
Member Author

It looks green :)

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

thanks @DeaMariaLeon !

@MarcoGorelli MarcoGorelli merged commit 1d7cab6 into pandas-dev:main Jul 5, 2023
@DeaMariaLeon DeaMariaLeon deleted the Jun30-2 branch July 5, 2023 07:55
Daquisu pushed a commit to Daquisu/pandas that referenced this pull request Jul 8, 2023
* Examples Rolling.max, cov, skew, apply

* correct skew

* Changing format skew

* Trying to fix skew

* Removed replace()

* Remove replace() correct doc.py links
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.

2 participants