diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 1974c98a1d1ff..c62501a70dbe3 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -129,7 +129,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.core.resample.Resampler.quantile PR01,PR07" \ -i "pandas.core.resample.Resampler.sem SA01" \ -i "pandas.core.resample.Resampler.std SA01" \ - -i "pandas.core.resample.Resampler.sum SA01" \ -i "pandas.core.resample.Resampler.transform PR01,RT03,SA01" \ -i "pandas.core.resample.Resampler.var SA01" \ -i "pandas.errors.AttributeConflictWarning SA01" \ diff --git a/pandas/core/resample.py b/pandas/core/resample.py index 42fed83398737..ca4d3fc768efb 100644 --- a/pandas/core/resample.py +++ b/pandas/core/resample.py @@ -1021,6 +1021,10 @@ def sum( """ Compute sum of group values. + This method provides a simple way to compute the sum of values within each + resampled group, particularly useful for aggregating time-based data into + daily, monthly, or yearly sums. + Parameters ---------- numeric_only : bool, default False @@ -1039,6 +1043,14 @@ def sum( Series or DataFrame Computed sum of values within each group. + See Also + -------- + core.resample.Resampler.mean : Compute mean of groups, excluding missing values. + core.resample.Resampler.count : Compute count of group, excluding missing + values. + DataFrame.resample : Resample time-series data. + Series.sum : Return the sum of the values over the requested axis. + Examples -------- >>> ser = pd.Series(