MCPcopy
hub / github.com/pandas-dev/pandas / max

Method max

pandas/core/groupby/groupby.py:3273–3387  ·  view source on GitHub ↗

Compute max of group values. 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, def

(
        self,
        numeric_only: bool = False,
        min_count: int = -1,
        skipna: bool = True,
        engine: Literal["cython", "numba"] | None = None,
        engine_kwargs: dict[str, bool] | None = None,
    )

Source from the content-addressed store, hash-verified

3271
3272 @final
3273 def max(
3274 self,
3275 numeric_only: bool = False,
3276 min_count: int = -1,
3277 skipna: bool = True,
3278 engine: Literal["cython", "numba"] | None = None,
3279 engine_kwargs: dict[str, bool] | None = None,
3280 ):
3281 """
3282 Compute max of group values.
3283
3284 Parameters
3285 ----------
3286 numeric_only : bool, default False
3287 Include only float, int, boolean columns.
3288
3289 .. versionchanged:: 2.0.0
3290
3291 numeric_only no longer accepts ``None``.
3292
3293 min_count : int, default -1
3294 The required number of valid values to perform the operation. If fewer
3295 than ``min_count`` non-NA values are present the result will be NA.
3296
3297 skipna : bool, default True
3298 Exclude NA/null values. If the entire group is NA and ``skipna`` is
3299 ``True``, the result will be NA.
3300
3301 .. versionchanged:: 3.0.0
3302
3303 engine : str, default None None
3304 * ``'cython'`` : Runs rolling apply through C-extensions from cython.
3305 * ``'numba'`` : Runs rolling apply through JIT compiled code from numba.
3306 Only available when ``raw`` is set to ``True``.
3307 * ``None`` : Defaults to ``'cython'`` or globally setting
3308 ``compute.use_numba``
3309
3310 engine_kwargs : dict, default None None
3311 * For ``'cython'`` engine, there are no accepted ``engine_kwargs``
3312 * For ``'numba'`` engine, the engine can accept ``nopython``, ``nogil``
3313 and ``parallel`` dictionary keys. The values must either be ``True`` or
3314 ``False``. The default ``engine_kwargs`` for the ``'numba'`` engine is
3315 ``{'nopython': True, 'nogil': False, 'parallel': False}`` and will be
3316 applied to both the ``func`` and the ``apply`` groupby aggregation.
3317
3318 Returns
3319 -------
3320 Series or DataFrame
3321 Computed max of values within each group.
3322
3323 See Also
3324 --------
3325 SeriesGroupBy.min : Return the min of the group values.
3326 DataFrameGroupBy.min : Return the min of the group values.
3327 SeriesGroupBy.max : Return the max of the group values.
3328 DataFrameGroupBy.max : Return the max of the group values.
3329 SeriesGroupBy.sum : Return the sum of the group values.
3330 DataFrameGroupBy.sum : Return the sum of the group values.

Callers

nothing calls this directly

Calls 3

_numba_agg_generalMethod · 0.95
_agg_generalMethod · 0.95
maybe_use_numbaFunction · 0.90

Tested by

no test coverage detected