@@ -364,87 +364,6 @@ class providing the base-class of operations.
364
364
--------
365
365
%(example)s"""
366
366
367
- _agg_template_series = """
368
- Aggregate using one or more operations.
369
-
370
- Parameters
371
- ----------
372
- func : function, str, list, dict or None
373
- Function to use for aggregating the data. If a function, must either
374
- work when passed a {klass} or when passed to {klass}.apply.
375
-
376
- Accepted combinations are:
377
-
378
- - function
379
- - string function name
380
- - list of functions and/or function names, e.g. ``[np.sum, 'mean']``
381
- - None, in which case ``**kwargs`` are used with Named Aggregation. Here the
382
- output has one column for each element in ``**kwargs``. The name of the
383
- column is keyword, whereas the value determines the aggregation used to compute
384
- the values in the column.
385
-
386
- Can also accept a Numba JIT function with
387
- ``engine='numba'`` specified. Only passing a single function is supported
388
- with this engine.
389
-
390
- If the ``'numba'`` engine is chosen, the function must be
391
- a user defined function with ``values`` and ``index`` as the
392
- first and second arguments respectively in the function signature.
393
- Each group's index will be passed to the user defined function
394
- and optionally available for use.
395
-
396
- .. deprecated:: 2.1.0
397
-
398
- Passing a dictionary is deprecated and will raise in a future version
399
- of pandas. Pass a list of aggregations instead.
400
- *args
401
- Positional arguments to pass to func.
402
- engine : str, default None
403
- * ``'cython'`` : Runs the function through C-extensions from cython.
404
- * ``'numba'`` : Runs the function through JIT compiled code from numba.
405
- * ``None`` : Defaults to ``'cython'`` or globally setting ``compute.use_numba``
406
-
407
- engine_kwargs : dict, default None
408
- * For ``'cython'`` engine, there are no accepted ``engine_kwargs``
409
- * For ``'numba'`` engine, the engine can accept ``nopython``, ``nogil``
410
- and ``parallel`` dictionary keys. The values must either be ``True`` or
411
- ``False``. The default ``engine_kwargs`` for the ``'numba'`` engine is
412
- ``{{'nopython': True, 'nogil': False, 'parallel': False}}`` and will be
413
- applied to the function
414
-
415
- **kwargs
416
- * If ``func`` is None, ``**kwargs`` are used to define the output names and
417
- aggregations via Named Aggregation. See ``func`` entry.
418
- * Otherwise, keyword arguments to be passed into func.
419
-
420
- Returns
421
- -------
422
- {klass}
423
-
424
- See Also
425
- --------
426
- {klass}GroupBy.apply : Apply function func group-wise
427
- and combine the results together.
428
- {klass}GroupBy.transform : Transforms the Series on each group
429
- based on the given function.
430
- {klass}.aggregate : Aggregate using one or more operations.
431
-
432
- Notes
433
- -----
434
- When using ``engine='numba'``, there will be no "fall back" behavior internally.
435
- The group data and group index will be passed as numpy arrays to the JITed
436
- user defined function, and no alternative execution attempts will be tried.
437
-
438
- Functions that mutate the passed object can produce unexpected
439
- behavior or errors and are not supported. See :ref:`gotchas.udf-mutation`
440
- for more details.
441
-
442
- .. versionchanged:: 1.3.0
443
-
444
- The resulting dtype will reflect the return value of the passed ``func``,
445
- see the examples below.
446
- {examples}"""
447
-
448
367
_agg_template_frame = """
449
368
Aggregate using one or more operations.
450
369
0 commit comments