52eb0d0c5f366de8766fc61ba801d205912ef78e,pandas/core/apply.py,Apply,agg,#Apply#,132

Before Change


        if _axis is None:
            _axis = getattr(obj, "axis", 0)

        if isinstance(arg, str):
            return obj._try_aggregate_string_function(arg, *args, **kwargs), None
        elif is_dict_like(arg):
            arg = cast(AggFuncTypeDict, arg)
            return agg_dict_like(obj, arg, _axis), True
        elif is_list_like(arg):
            // we require a list, but not a "str"
            arg = cast(List[AggFuncTypeBase], arg)
            return agg_list_like(obj, arg, _axis=_axis), None
        else:
            result = None

        if callable(arg):
            f = obj._get_cython_func(arg)
            if f and not args and not kwargs:
                return getattr(obj, f)(), None

After Change


        if _axis is None:
            _axis = getattr(obj, "axis", 0)

        result = self.maybe_apply_str()
        if result is not None:
            return result, None

        if is_dict_like(arg):
            arg = cast(AggFuncTypeDict, arg)
            return agg_dict_like(obj, arg, _axis), True
        elif is_list_like(arg):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: pandas-dev/pandas
Commit Name: 52eb0d0c5f366de8766fc61ba801d205912ef78e
Time: 2021-01-11
Author: 45562402+rhshadrach@users.noreply.github.com
File Name: pandas/core/apply.py
Class Name: Apply
Method Name: agg


Project Name: pandas-dev/pandas
Commit Name: 52eb0d0c5f366de8766fc61ba801d205912ef78e
Time: 2021-01-11
Author: 45562402+rhshadrach@users.noreply.github.com
File Name: pandas/core/apply.py
Class Name: FrameApply
Method Name: apply


Project Name: pandas-dev/pandas
Commit Name: 52eb0d0c5f366de8766fc61ba801d205912ef78e
Time: 2021-01-11
Author: 45562402+rhshadrach@users.noreply.github.com
File Name: pandas/core/apply.py
Class Name: SeriesApply
Method Name: apply