Skip to content

DOC: Updated Resampler.mean docstring to have its own docstring #48980

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 2 commits into from
Oct 7, 2022

Conversation

donghyyun
Copy link
Contributor

@donghyyun donghyyun commented Oct 7, 2022

By default, the Resampler.mean docstring is inherited from GroupBy.mean. As a result, unsupported parameters 'engine' and 'engine_kwargs' were created in the API documentation.

To do this, I defined the Mean function as a method of Resampler and wrote the docstring of the function itself.

  • FYI
    • I think it is unnecessary adding this issue to Whatsnew section, so I left it.
    • I closed previous PR. This one is newly created.

@donghyyun
Copy link
Contributor Author

I found that doc build error also occurs in previous commit(#48965).
when I run python doc/make.py html in my local computer, same error occurs.

Copy link
Member

@phofl phofl left a comment

Choose a reason for hiding this comment

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

doc failure is related to a dependency

numeric_only : bool, default False
Include only `float`, `int` or `boolean` data.

.. versionadded:: 1.5.0
Copy link
Member

Choose a reason for hiding this comment

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

Why this versionadded?

Copy link
Contributor Author

@donghyyun donghyyun Oct 7, 2022

Choose a reason for hiding this comment

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

@phofl In var, std method, numeric_only versionadded is written. So I thought mean method also need versionadded. If it is wrong, I will fix it.

Copy link
Member

Choose a reason for hiding this comment

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

var and std did not support this prior to 1.5, but this function was consistent with the groupby op that already supported this before. So you can remove it

Copy link
Contributor Author

@donghyyun donghyyun Oct 7, 2022

Choose a reason for hiding this comment

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

Thank you for comments. I removed it.

Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

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

LGTM.

(As an aside, we should probably not auto-generate these methods for resample like we did groupby cc @rhshadrach)

@mroeschke mroeschke added Docs Resample resample method Reduction Operations sum, mean, min, max, etc. labels Oct 7, 2022
@mroeschke mroeschke added this to the 1.6 milestone Oct 7, 2022
@mroeschke mroeschke merged commit 9fb69e6 into pandas-dev:main Oct 7, 2022
@mroeschke
Copy link
Member

Thanks @donghyyun

@donghyyun donghyyun deleted the update-resample_mean branch October 11, 2022 02:14
@mroeschke mroeschke modified the milestones: 1.6, 2.0 Oct 13, 2022
noatamir pushed a commit to noatamir/pandas that referenced this pull request Nov 9, 2022
…as-dev#48980)

* DOC: Added mean function as method of Resampler and updated docstring

* removed versionadded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Reduction Operations sum, mean, min, max, etc. Resample resample method
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: Remove unsupported parameters in Resampler.mean
3 participants