Skip to content

Commit b74ee4a

Browse files
knowltodpre-commit-ci[bot]mroeschke
authored
DOC: Fix some core.resample.Resampler docstrings (#60502)
* fixed resample.Resampler docstring errors in min, max, mean, prod, std, var as indicated by vaildate_docstrings.py * fixed resample.Resampler docstring errors in min, max, mean, prod, std, var as indicated by vaildate_docstrings.py * fixed trailing whitespace on line 1161 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Matthew Roeschke <[email protected]>
1 parent 76a20bd commit b74ee4a

File tree

2 files changed

+75
-6
lines changed

2 files changed

+75
-6
lines changed

ci/code_checks.sh

-6
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,8 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
8484
-i "pandas.arrays.TimedeltaArray PR07,SA01" \
8585
-i "pandas.core.groupby.DataFrameGroupBy.plot PR02" \
8686
-i "pandas.core.groupby.SeriesGroupBy.plot PR02" \
87-
-i "pandas.core.resample.Resampler.max PR01,RT03,SA01" \
88-
-i "pandas.core.resample.Resampler.mean SA01" \
89-
-i "pandas.core.resample.Resampler.min PR01,RT03,SA01" \
90-
-i "pandas.core.resample.Resampler.prod SA01" \
9187
-i "pandas.core.resample.Resampler.quantile PR01,PR07" \
92-
-i "pandas.core.resample.Resampler.std SA01" \
9388
-i "pandas.core.resample.Resampler.transform PR01,RT03,SA01" \
94-
-i "pandas.core.resample.Resampler.var SA01" \
9589
-i "pandas.errors.ValueLabelTypeMismatch SA01" \
9690
-i "pandas.plotting.andrews_curves RT03,SA01" \
9791
-i "pandas.tseries.offsets.BDay PR02,SA01" \

pandas/core/resample.py

+75
Original file line numberDiff line numberDiff line change
@@ -1096,6 +1096,13 @@ def prod(
10961096
Series or DataFrame
10971097
Computed prod of values within each group.
10981098
1099+
See Also
1100+
--------
1101+
core.resample.Resampler.sum : Compute sum of groups, excluding missing values.
1102+
core.resample.Resampler.mean : Compute mean of groups, excluding missing values.
1103+
core.resample.Resampler.median : Compute median of groups, excluding missing
1104+
values.
1105+
10991106
Examples
11001107
--------
11011108
>>> ser = pd.Series(
@@ -1126,9 +1133,30 @@ def min(
11261133
"""
11271134
Compute min value of group.
11281135
1136+
Parameters
1137+
----------
1138+
numeric_only : bool, default False
1139+
Include only float, int, boolean columns.
1140+
1141+
.. versionchanged:: 2.0.0
1142+
1143+
numeric_only no longer accepts ``None``.
1144+
1145+
min_count : int, default 0
1146+
The required number of valid values to perform the operation. If fewer
1147+
than ``min_count`` non-NA values are present the result will be NA.
1148+
11291149
Returns
11301150
-------
11311151
Series or DataFrame
1152+
Compute the minimum value in the given Series or DataFrame.
1153+
1154+
See Also
1155+
--------
1156+
core.resample.Resampler.max : Compute max value of group.
1157+
core.resample.Resampler.mean : Compute mean of groups, excluding missing values.
1158+
core.resample.Resampler.median : Compute median of groups, excluding missing
1159+
values.
11321160
11331161
Examples
11341162
--------
@@ -1160,9 +1188,30 @@ def max(
11601188
"""
11611189
Compute max value of group.
11621190
1191+
Parameters
1192+
----------
1193+
numeric_only : bool, default False
1194+
Include only float, int, boolean columns.
1195+
1196+
.. versionchanged:: 2.0.0
1197+
1198+
numeric_only no longer accepts ``None``.
1199+
1200+
min_count : int, default 0
1201+
The required number of valid values to perform the operation. If fewer
1202+
than ``min_count`` non-NA values are present the result will be NA.
1203+
11631204
Returns
11641205
-------
11651206
Series or DataFrame
1207+
Computes the maximum value in the given Series or Dataframe.
1208+
1209+
See Also
1210+
--------
1211+
core.resample.Resampler.min : Compute min value of group.
1212+
core.resample.Resampler.mean : Compute mean of groups, excluding missing values.
1213+
core.resample.Resampler.median : Compute median of groups, excluding missing
1214+
values.
11661215
11671216
Examples
11681217
--------
@@ -1236,6 +1285,16 @@ def mean(
12361285
DataFrame or Series
12371286
Mean of values within each group.
12381287
1288+
See Also
1289+
--------
1290+
core.resample.Resampler.median : Compute median of groups, excluding missing
1291+
values.
1292+
core.resample.Resampler.sum : Compute sum of groups, excluding missing values.
1293+
core.resample.Resampler.std : Compute standard deviation of groups, excluding
1294+
missing values.
1295+
core.resample.Resampler.var : Compute variance of groups, excluding missing
1296+
values.
1297+
12391298
Examples
12401299
--------
12411300
@@ -1285,6 +1344,14 @@ def std(
12851344
DataFrame or Series
12861345
Standard deviation of values within each group.
12871346
1347+
See Also
1348+
--------
1349+
core.resample.Resampler.mean : Compute mean of groups, excluding missing values.
1350+
core.resample.Resampler.median : Compute median of groups, excluding missing
1351+
values.
1352+
core.resample.Resampler.var : Compute variance of groups, excluding missing
1353+
values.
1354+
12881355
Examples
12891356
--------
12901357
@@ -1336,6 +1403,14 @@ def var(
13361403
DataFrame or Series
13371404
Variance of values within each group.
13381405
1406+
See Also
1407+
--------
1408+
core.resample.Resampler.std : Compute standard deviation of groups, excluding
1409+
missing values.
1410+
core.resample.Resampler.mean : Compute mean of groups, excluding missing values.
1411+
core.resample.Resampler.median : Compute median of groups, excluding missing
1412+
values.
1413+
13391414
Examples
13401415
--------
13411416

0 commit comments

Comments
 (0)