-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: RT03 fix for various DataFrameGroupBy and SeriesGroupBy methods #57862
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
Changes from 6 commits
feb79dd
093bfe0
be885fc
8006d8e
ff20a68
050375d
48e266e
cb2264d
fdc9fb4
00e9a15
7da7f7b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -333,6 +333,8 @@ class providing the base-class of operations. | |
Returns | ||
------- | ||
%(klass)s | ||
%(klass)s with the same indexes as the original object filled | ||
with transformed values. | ||
|
||
See Also | ||
-------- | ||
|
@@ -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``. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated |
||
|
||
See Also | ||
-------- | ||
|
@@ -2244,6 +2247,7 @@ def mean( | |
Returns | ||
------- | ||
pandas.Series or pandas.DataFrame | ||
Mean of values within each group. Same object type as the caller. | ||
%(see_also)s | ||
Examples | ||
-------- | ||
|
@@ -3511,11 +3515,12 @@ def resample(self, rule, *args, include_groups: bool = True, **kwargs) -> Resamp | |
|
||
Returns | ||
------- | ||
pandas.api.typing.DatetimeIndexResamplerGroupby, | ||
pandas.api.typing.PeriodIndexResamplerGroupby, or | ||
pandas.api.typing.TimedeltaIndexResamplerGroupby | ||
pandas.api.typing.DatetimeIndexResampler | ||
Return a new groupby object, with type depending on the data | ||
being resampled. | ||
being resampled: | ||
- pandas.api.typing.DatetimeIndexResamplerGroupby | ||
- pandas.api.typing.PeriodIndexResamplerGroupby | ||
- pandas.api.typing.TimedeltaIndexResamplerGroupby | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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: And in the description you can have something like There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
||
See Also | ||
-------- | ||
|
@@ -4590,7 +4595,8 @@ def rank( | |
|
||
Returns | ||
------- | ||
DataFrame with ranking of values within each group | ||
DataFrame | ||
The ranking of values within each group. | ||
%(see_also)s | ||
Examples | ||
-------- | ||
|
@@ -4662,6 +4668,7 @@ def cumprod(self, *args, **kwargs) -> NDFrameT: | |
Returns | ||
------- | ||
Series or DataFrame | ||
Cumulative product for each group. Same object type as the caller. | ||
%(see_also)s | ||
Examples | ||
-------- | ||
|
@@ -4720,6 +4727,7 @@ def cumsum(self, *args, **kwargs) -> NDFrameT: | |
Returns | ||
------- | ||
Series or DataFrame | ||
Cumulative sum for each group. Same object type as the caller. | ||
%(see_also)s | ||
Examples | ||
-------- | ||
|
@@ -4782,6 +4790,7 @@ def cummin( | |
Returns | ||
------- | ||
Series or DataFrame | ||
Cumulative min for each group. Same object type as the caller. | ||
%(see_also)s | ||
Examples | ||
-------- | ||
|
@@ -4852,6 +4861,7 @@ def cummax( | |
Returns | ||
------- | ||
Series or DataFrame | ||
Cumulative max for each group. Same object type as the caller. | ||
%(see_also)s | ||
Examples | ||
-------- | ||
|
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.
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.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.
Make sense. Couldn't think of anything else so I use yours.