Skip to content
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

DOC: RT03 fix for various DataFrameGroupBy and SeriesGroupBy methods #57862

Merged
merged 11 commits into from
Apr 1, 2024

Conversation

quangngd
Copy link
Contributor

@quangngd quangngd commented Mar 16, 2024

@quangngd quangngd changed the title 57416 partial DOC: RT03 fix for various DataFrameGroupBy and SeriesGroupBy methods Mar 16, 2024
Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

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

Thanks for working on this @quangngd.

Very nice job, there is just one description that is not very clear, at least to me, see the comment.

@@ -240,6 +240,7 @@ def apply(self, func, *args, **kwargs) -> Series:
Returns
-------
Series or DataFrame
The resulting dtype will reflect the return value of the passed ``func``.
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't seem very clear to me. Why not something like A pandas object with the result of applying ``func`` to each group.. Or maybe you can think of something better, but the return description should focus on what's being returned, not which type is being returned.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Make sense. Couldn't think of anything else so I use yours.

@@ -1550,6 +1552,7 @@ def apply(self, func, *args, include_groups: bool = True, **kwargs) -> NDFrameT:
Returns
-------
Series or DataFrame
The resulting dtype will reflect the return value of the passed ``func``.
Copy link
Member

Choose a reason for hiding this comment

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

Same as above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@datapythonista
Copy link
Member

/preview

Copy link
Contributor

Website preview of this PR available at: https://pandas.pydata.org/preview/pandas-dev/pandas/57862/

Comment on lines 3520 to 3523
being resampled:
- pandas.api.typing.DatetimeIndexResamplerGroupby
- pandas.api.typing.PeriodIndexResamplerGroupby
- pandas.api.typing.TimedeltaIndexResamplerGroupby
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't seem to be rendering correctly: https://pandas.pydata.org/preview/pandas-dev/pandas/57862/docs/reference/api/pandas.core.groupby.DataFrameGroupBy.resample.html#pandas.core.groupby.DataFrameGroupBy.resample

Also, the type is incorrect now. Why don't you leave as type simply: DatetimeIndexResampler, PeriodIndexResampler or TimdeltaResampler

And in the description you can have something like Resampler object for the type of the index.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated. But i'll hold this up and wait for the new flow regarding alll this doc-related thingy

@datapythonista
Copy link
Member

@quangngd we changed how we specify the pending errors in code_checks.sh and you'll have to resolve the conflicts. Sorry for the inconvenience.

@quangngd
Copy link
Contributor Author

@datapythonista resolved

@mroeschke mroeschke added this to the 3.0 milestone Apr 1, 2024
@mroeschke mroeschke merged commit 22f930a into pandas-dev:main Apr 1, 2024
46 checks passed
@mroeschke
Copy link
Member

Thanks @quangngd

pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this pull request May 7, 2024
…andas-dev#57862)

* pandas.core.groupby.SeriesGroupBy.apply

* pandas.core.groupby.GroupBy.apply

* rm check

* add a bunch

* fix

* fix

* wip

* update pandas.core.groupby.DataFrameGroupBy.resample

* rm check from code_checls

* minor
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.

3 participants