Skip to content

Commit cfe1890

Browse files
author
Kei
committed
Update doc
1 parent eaf9e21 commit cfe1890

File tree

1 file changed

+47
-11
lines changed

1 file changed

+47
-11
lines changed

pandas/core/groupby/groupby.py

Lines changed: 47 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,6 @@ class providing the base-class of operations.
220220
``{{'nopython': True, 'nogil': False, 'parallel': False}}`` and will be
221221
applied to both the ``func`` and the ``apply`` groupby aggregation.
222222
223-
{extra_args}
224-
225223
Returns
226224
-------
227225
Series or DataFrame
@@ -232,6 +230,52 @@ class providing the base-class of operations.
232230
{example}
233231
"""
234232

233+
_groupby_agg_method_engine_remove_nan_template = """
234+
Compute {fname} of group values.
235+
236+
Parameters
237+
----------
238+
numeric_only : bool, default {no}
239+
Include only float, int, boolean columns.
240+
241+
.. versionchanged:: 2.0.0
242+
243+
numeric_only no longer accepts ``None``.
244+
245+
min_count : int, default {mc}
246+
The required number of valid values to perform the operation. If fewer
247+
than ``min_count`` non-NA values are present the result will be NA.
248+
249+
engine : str, default None {e}
250+
* ``'cython'`` : Runs rolling apply through C-extensions from cython.
251+
* ``'numba'`` : Runs rolling apply through JIT compiled code from numba.
252+
Only available when ``raw`` is set to ``True``.
253+
* ``None`` : Defaults to ``'cython'`` or globally setting ``compute.use_numba``
254+
255+
engine_kwargs : dict, default None {ek}
256+
* For ``'cython'`` engine, there are no accepted ``engine_kwargs``
257+
* For ``'numba'`` engine, the engine can accept ``nopython``, ``nogil``
258+
and ``parallel`` dictionary keys. The values must either be ``True`` or
259+
``False``. The default ``engine_kwargs`` for the ``'numba'`` engine is
260+
``{{'nopython': True, 'nogil': False, 'parallel': False}}`` and will be
261+
applied to both the ``func`` and the ``apply`` groupby aggregation.
262+
263+
**kwargs : dict, optional
264+
* A dictionary of keyword arguments passed into `func`.
265+
* To remove NaN values in result using result mask, mainly to prevent type
266+
coercion to float64, ``'remove_nan'`` is accepted as dictionary keys.
267+
The values must be either ``True`` or ``False``.
268+
269+
Returns
270+
-------s
271+
Series or DataFrame
272+
Computed {fname} of values within each group.
273+
274+
Examples
275+
--------
276+
{example}
277+
"""
278+
235279
_pipe_template = """
236280
Apply a ``func`` with arguments to this %(klass)s object and return its result.
237281
@@ -3048,20 +3092,12 @@ def prod(self, numeric_only: bool = False, min_count: int = 0) -> NDFrameT:
30483092

30493093
@final
30503094
@doc(
3051-
_groupby_agg_method_engine_template,
3095+
_groupby_agg_method_engine_remove_nan_template,
30523096
fname="min",
30533097
no=False,
30543098
mc=-1,
30553099
e=None,
30563100
ek=None,
3057-
extra_args=dedent(
3058-
"""\
3059-
**kwargs : dict, optional
3060-
* A dictionary of keyword arguments passed into `func`.
3061-
* To remove NaN values in result using result mask, mainly to prevent
3062-
type coercion to float64, ``'remove_nan'`` is accepted as dictionary
3063-
keys. The values must be either ``True`` or ``False``."""
3064-
),
30653101
example=dedent(
30663102
"""\
30673103
For SeriesGroupBy:

0 commit comments

Comments
 (0)