Skip to content

DOC: Fixing EX01 - Added examples #53982

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

Conversation

DeaMariaLeon
Copy link
Member

Towards #37875

I could not make the html of each method, so I'm not sure if everything looks well.
I'll use /preview here.

@DeaMariaLeon DeaMariaLeon requested a review from mroeschke as a code owner July 3, 2023 14:48
@DeaMariaLeon DeaMariaLeon requested a review from MarcoGorelli July 3, 2023 14:48
@DeaMariaLeon DeaMariaLeon added this to the 2.1 milestone Jul 3, 2023
"""
>>> ser = pd.Series([0, 1, 5, 2, 8])

In order to get an instance of pandas.core.window.rolling.Window we need
Copy link
Member

Choose a reason for hiding this comment

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

does this link work? I think you may need to write :class:pandas.core.window.rolling.Window, or :class:~pandas.core.window.rolling.Window to hide part of the path

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you

4 4.242641
dtype: float64
"""
).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.

same comment as in the other 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.

Ouch... I just saw this one! - I'll change it.

<class 'pandas.core.window.rolling.Window'>

In order to use the `Sci-py` gaussian window we need to provide the parameters
M and std. The parameter M corresponds to 2 in our example.
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 add backticks to the variable names here? Like

`M` and `std`

The general rule (which admittedly isn't followed very consistently) from the numpy guide is to use single backticks for variable names, and double backticks otherwise

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry, I forgot about that.

>>> type(ser.rolling(2, win_type='gaussian'))
<class 'pandas.core.window.rolling.Window'>

In order to use the `Sci-py` gaussian window we need to provide the parameters
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 we can just write "SciPy"

also, gaussian => Gaussian

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

"""\
>>> ser = pd.Series([0, 1, 5, 2, 8])

To get an instance of :class: ~pandas.core.window.rolling.Window we need
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 it might need to be

:class:`~pandas.core.window.rolling.Window`

Copy link
Member Author

Choose a reason for hiding this comment

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

Done - thanks.

@MarcoGorelli
Copy link
Member

/preview

@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2023

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

@MarcoGorelli
Copy link
Member

Nice! Looks like there's just a merge conflict to resolve

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, should be good, thanks @DeaMariaLeon !

@MarcoGorelli MarcoGorelli merged commit 172b7c1 into pandas-dev:main Jul 5, 2023
@DeaMariaLeon DeaMariaLeon deleted the Jul3 branch July 5, 2023 08:08
Daquisu pushed a commit to Daquisu/pandas that referenced this pull request Jul 8, 2023
* Examples Window.mean, sum, var, std

* Corrections to docstrings

* Removed replace()

* Correct link take 2

* remove replace() to right method
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