-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
Conversation
No preview found for PR #53948. Did the docs build complete? |
/preview |
Website preview of this PR available at: https://pandas.pydata.org/preview/53948/ |
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.
nice - looks like there's a failing doctest though
This last fail doesn't look like it's related to the example. |
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.
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
Thank you |
pandas/core/window/doc.py
Outdated
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 |
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.
why are we modifying these? looks like the links work in the latest release:
https://pandas.pydata.org/docs/reference/api/pandas.core.window.rolling.Rolling.apply.html
but they don't work here
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'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.
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! I'll check again once the new preview renders. this may be a bug in validate_docstrings
unfortunately
pandas/core/window/rolling.py
Outdated
""" | ||
A minimum of three periods is required for the rolling calculation.\n | ||
""" | ||
).replace("\n", "", 1), |
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.
can we remove this replace too?
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.
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).
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.
ah I see, thanks - maybe we can remove the rest as part of a separate PR?
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
It looks green :) |
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 @DeaMariaLeon !
* Examples Rolling.max, cov, skew, apply * correct skew * Changing format skew * Trying to fix skew * Removed replace() * Remove replace() correct doc.py links
Towards #37875