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: Fix some core.resample.Resampler docstrings #60502

Merged
merged 5 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,8 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.arrays.TimedeltaArray PR07,SA01" \
-i "pandas.core.groupby.DataFrameGroupBy.plot PR02" \
-i "pandas.core.groupby.SeriesGroupBy.plot PR02" \
-i "pandas.core.resample.Resampler.max PR01,RT03,SA01" \
-i "pandas.core.resample.Resampler.mean SA01" \
-i "pandas.core.resample.Resampler.min PR01,RT03,SA01" \
-i "pandas.core.resample.Resampler.prod SA01" \
-i "pandas.core.resample.Resampler.quantile PR01,PR07" \
-i "pandas.core.resample.Resampler.std SA01" \
-i "pandas.core.resample.Resampler.transform PR01,RT03,SA01" \
-i "pandas.core.resample.Resampler.var SA01" \
-i "pandas.errors.ValueLabelTypeMismatch SA01" \
-i "pandas.plotting.andrews_curves RT03,SA01" \
-i "pandas.tseries.offsets.BDay PR02,SA01" \
Expand Down
75 changes: 75 additions & 0 deletions pandas/core/resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,13 @@ def prod(
Series or DataFrame
Computed prod of values within each group.

See Also
--------
core.resample.Resampler.sum : Compute sum of groups, excluding missing values.
core.resample.Resampler.mean : Compute mean of groups, excluding missing values.
core.resample.Resampler.median : Compute median of groups, excluding missing
values.

Examples
--------
>>> ser = pd.Series(
Expand Down Expand Up @@ -1126,9 +1133,30 @@ def min(
"""
Compute min value of group.

Parameters
----------
numeric_only : bool, default False
Include only float, int, boolean columns.

.. versionchanged:: 2.0.0

numeric_only no longer accepts ``None``.

min_count : int, default 0
The required number of valid values to perform the operation. If fewer
than ``min_count`` non-NA values are present the result will be NA.

Returns
-------
Series or DataFrame
Compute the minimum value in the given Series or DataFrame.

See Also
--------
core.resample.Resampler.max : Compute max value of group.
core.resample.Resampler.mean : Compute mean of groups, excluding missing values.
core.resample.Resampler.median : Compute median of groups, excluding missing
values.

Examples
--------
Expand Down Expand Up @@ -1160,9 +1188,30 @@ def max(
"""
Compute max value of group.

Parameters
----------
numeric_only : bool, default False
Include only float, int, boolean columns.

.. versionchanged:: 2.0.0

numeric_only no longer accepts ``None``.

min_count : int, default 0
The required number of valid values to perform the operation. If fewer
than ``min_count`` non-NA values are present the result will be NA.

Returns
-------
Series or DataFrame
Computes the maximum value in the given Series or Dataframe.

See Also
--------
core.resample.Resampler.min : Compute min value of group.
core.resample.Resampler.mean : Compute mean of groups, excluding missing values.
core.resample.Resampler.median : Compute median of groups, excluding missing
values.

Examples
--------
Expand Down Expand Up @@ -1236,6 +1285,16 @@ def mean(
DataFrame or Series
Mean of values within each group.

See Also
--------
core.resample.Resampler.median : Compute median of groups, excluding missing
values.
core.resample.Resampler.sum : Compute sum of groups, excluding missing values.
core.resample.Resampler.std : Compute standard deviation of groups, excluding
missing values.
core.resample.Resampler.var : Compute variance of groups, excluding missing
values.

Examples
--------

Expand Down Expand Up @@ -1285,6 +1344,14 @@ def std(
DataFrame or Series
Standard deviation of values within each group.

See Also
--------
core.resample.Resampler.mean : Compute mean of groups, excluding missing values.
core.resample.Resampler.median : Compute median of groups, excluding missing
values.
core.resample.Resampler.var : Compute variance of groups, excluding missing
values.

Examples
--------

Expand Down Expand Up @@ -1336,6 +1403,14 @@ def var(
DataFrame or Series
Variance of values within each group.

See Also
--------
core.resample.Resampler.std : Compute standard deviation of groups, excluding
missing values.
core.resample.Resampler.mean : Compute mean of groups, excluding missing values.
core.resample.Resampler.median : Compute median of groups, excluding missing
values.

Examples
--------

Expand Down
Loading