@@ -214,6 +214,61 @@ class providing the base-class of operations.
214
214
{example}
215
215
"""
216
216
217
+ _groupby_agg_method_skipna_engine_template = """
218
+ Compute {fname} of group values.
219
+
220
+ Parameters
221
+ ----------
222
+ numeric_only : bool, default {no}
223
+ Include only float, int, boolean columns.
224
+
225
+ .. versionchanged:: 2.0.0
226
+
227
+ numeric_only no longer accepts ``None``.
228
+
229
+ min_count : int, default {mc}
230
+ The required number of valid values to perform the operation. If fewer
231
+ than ``min_count`` non-NA values are present the result will be NA.
232
+
233
+ skipna : bool, default {s}
234
+ Exclude NA/null values. If the entire group is NA and ``skipna`` is
235
+ ``True``, the result will be NA.
236
+
237
+ .. versionchanged:: 3.0.0
238
+
239
+ engine : str, default None {e}
240
+ * ``'cython'`` : Runs rolling apply through C-extensions from cython.
241
+ * ``'numba'`` : Runs rolling apply through JIT compiled code from numba.
242
+ Only available when ``raw`` is set to ``True``.
243
+ * ``None`` : Defaults to ``'cython'`` or globally setting ``compute.use_numba``
244
+
245
+ engine_kwargs : dict, default None {ek}
246
+ * For ``'cython'`` engine, there are no accepted ``engine_kwargs``
247
+ * For ``'numba'`` engine, the engine can accept ``nopython``, ``nogil``
248
+ and ``parallel`` dictionary keys. The values must either be ``True`` or
249
+ ``False``. The default ``engine_kwargs`` for the ``'numba'`` engine is
250
+ ``{{'nopython': True, 'nogil': False, 'parallel': False}}`` and will be
251
+ applied to both the ``func`` and the ``apply`` groupby aggregation.
252
+
253
+ Returns
254
+ -------
255
+ Series or DataFrame
256
+ Computed {fname} of values within each group.
257
+
258
+ See Also
259
+ --------
260
+ SeriesGroupBy.min : Return the min of the group values.
261
+ DataFrameGroupBy.min : Return the min of the group values.
262
+ SeriesGroupBy.max : Return the max of the group values.
263
+ DataFrameGroupBy.max : Return the max of the group values.
264
+ SeriesGroupBy.sum : Return the sum of the group values.
265
+ DataFrameGroupBy.sum : Return the sum of the group values.
266
+
267
+ Examples
268
+ --------
269
+ {example}
270
+ """
271
+
217
272
_pipe_template = """
218
273
Apply a ``func`` with arguments to this %(klass)s object and return its result.
219
274
@@ -2108,10 +2163,10 @@ def mean(
2108
2163
numeric_only no longer accepts ``None`` and defaults to ``False``.
2109
2164
2110
2165
skipna : bool, default True
2111
- Exclude NA/null values. If the entire group is NA and ``skipna`` is
2112
- True, the result will be NA.
2166
+ Exclude NA/null values. If an entire row/column is NA, the result
2167
+ will be NA.
2113
2168
2114
- -- versionadded:: 3.0.0
2169
+ .. versionadded:: 3.0.0
2115
2170
2116
2171
engine : str, default None
2117
2172
* ``'cython'`` : Runs the operation through C-extensions from cython.
@@ -2828,10 +2883,11 @@ def size(self) -> DataFrame | Series:
2828
2883
2829
2884
@final
2830
2885
@doc (
2831
- _groupby_agg_method_engine_template ,
2886
+ _groupby_agg_method_skipna_engine_template ,
2832
2887
fname = "sum" ,
2833
2888
no = False ,
2834
2889
mc = 0 ,
2890
+ s = True ,
2835
2891
e = None ,
2836
2892
ek = None ,
2837
2893
example = dedent (
0 commit comments