Skip to content

Conversation

@Akashisang
Copy link
Contributor

@Akashisang Akashisang commented Oct 12, 2025

@Akashisang Akashisang changed the title Gh/62437 DOC: Replace @doc @appender and @substitution decorator with inline docstrings in core/window/expanding.py Oct 12, 2025
>>> df = pd.DataFrame({"A": [1, 2, 3], "B": [4, 5, 6], "C": [7, 8, 9]})
>>> df
A B C
A B C
Copy link
Member

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?

Copy link
Contributor Author

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.

>>> df.ewm(alpha=0.5).mean()
A B C
A B C
Copy link
Member

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

Comment on lines 401 to 419
>>> 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
Copy link
Member

Choose a reason for hiding this comment

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

Can you dedent this?

Copy link
Contributor Author

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.

@mroeschke mroeschke added the Docs label Oct 13, 2025
@mroeschke mroeschke added this to the 3.0 milestone Oct 13, 2025
@mroeschke mroeschke merged commit aa7d1d4 into pandas-dev:main Oct 13, 2025
42 checks passed
@mroeschke
Copy link
Member

Thanks @Akashisang

@Akashisang Akashisang deleted the gh/62437 branch October 14, 2025 00:54
mraabhijit pushed a commit to mraabhijit/pandas that referenced this pull request Oct 17, 2025
eicchen pushed a commit to eicchen/pandas that referenced this pull request Oct 18, 2025
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