Skip to content

Commit

Permalink
FIX-#2254: Removed redundant argument conversion
Browse files Browse the repository at this point in the history
because it is already done inside of base backend.

Signed-off-by: Gregory Shimansky <gregory.shimansky@intel.com>
  • Loading branch information
gshimansky committed Nov 13, 2020
1 parent 412c1c9 commit 6917382
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions modin/backends/pandas/query_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2577,23 +2577,11 @@ def groupby_agg(
agg_func = wrap_udf_function(agg_func)

if is_multi_by:
# If function was kept as a dictionary until now, it is now necessary to repeat all steps
# that were skipped previously, that is, make it a lambda. This is necessary
# because default to pandas is unable to operate with dictionary aggregation function argument,
# it accepts only callable functions.
if isinstance(agg_func, dict):
callable_func = wrap_udf_function(
lambda df, *args, **kwargs: df.aggregate(
agg_func, *agg_args, **agg_kwargs
)
)
else:
callable_func = agg_func
return super().groupby_agg(
by=by,
is_multi_by=is_multi_by,
axis=axis,
agg_func=callable_func,
agg_func=agg_func,
agg_args=agg_args,
agg_kwargs=agg_kwargs,
groupby_kwargs=groupby_kwargs,
Expand Down

0 comments on commit 6917382

Please sign in to comment.