-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
DOC: Replace @doc @appender and @substitution decorator with inline docstrings in core/window/expanding.py #62664
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
pandas/core/window/expanding.py
Outdated
| >>> df = pd.DataFrame({"A": [1, 2, 3], "B": [4, 5, 6], "C": [7, 8, 9]}) | ||
| >>> df | ||
| A B C | ||
| A B C |
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 these labeled dedented?
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.
It was an oversight. I missed it during the review.
pandas/core/window/expanding.py
Outdated
| >>> df.ewm(alpha=0.5).mean() | ||
| A B C | ||
| A B C |
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.
The alignment on these columns also looks off
pandas/core/window/expanding.py
Outdated
| >>> df = pd.DataFrame( | ||
| ... {"A": [1, 2, 3, 4]}, index=pd.date_range("2012-08-02", periods=4) | ||
| ... ) | ||
| >>> df | ||
| A | ||
| 2012-08-02 1 | ||
| 2012-08-03 2 | ||
| 2012-08-04 3 | ||
| 2012-08-05 4 | ||
| To get the difference between each expanding window's maximum and minimum | ||
| value in one pass, you can do | ||
| >>> df.expanding().pipe(lambda x: x.max() - x.min()) | ||
| A | ||
| 2012-08-02 0.0 | ||
| 2012-08-03 1.0 | ||
| 2012-08-04 2.0 | ||
| 2012-08-05 3.0 |
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 you dedent this?
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've done. and I’ve reviewed all once more, and it seems okay, maybe.
|
Thanks @Akashisang |
…ocstrings in core/window/expanding.py (pandas-dev#62664)
…ocstrings in core/window/expanding.py (pandas-dev#62664)
@Appender,@Substitution,@docwith inlined docstrings #62437doc/source/whatsnew/vX.X.X.rstfile if fixing a bug or adding a new feature.