modin.pandas.DataFrameGroupBy.transform¶
- DataFrameGroupBy.transform(func, *args, engine=None, engine_kwargs=None, **kwargs)[source]¶
Call function producing a same-indexed DataFrame on each group.
Returns a DataFrame having the same indexes as the original object filled with the transformed values.
- Parameters:
func (function, str) –
Function to apply to each group. See the Notes section below for requirements.
Accepted inputs are:
String (needs to be the name of groupby method you want to use)
Python function
*args (Any) – Positional arguments to pass to func.
engine (str, default None) –
'cython': Runs the function through C-extensions from cython.'numba': Runs the function through JIT compiled code from numba.None: Defaults to'cython'or the global settingcompute.use_numba
This parameter is ignored in Snowpark pandas, as the execution is always performed in Snowflake.
engine_kwargs (dict, default None) –
For
'cython'engine, there are no acceptedengine_kwargsFor
'numba'engine, the engine can acceptnopython,nogilandparalleldictionary keys. The values must either beTrueorFalse. The defaultengine_kwargsfor the'numba'engine is{'nopython': True, 'nogil': False, 'parallel': False}and will be applied to the function
This parameter is ignored in Snowpark pandas, as the execution is always performed in Snowflake.
**kwargs (Any) – Keyword arguments to be passed into func.
Notes
Functions that mutate the passed object can produce unexpected behavior or errors and are not supported.
Returning a Series or scalar in
funcis not yet supported in Snowpark pandas.Examples