516b77610d058cfe3a6f379e8ff9753065d48707,janitor/functions.py,,groupby_agg,#,3208

Before Change


    :returns: A pandas DataFrame.
    
    new_col = df.groupby(by)[agg_column_name].transform(agg)
    df_new = df.assign(**{new_column_name: new_col})
    return df_new


@pf.register_dataframe_accessor("data_description")

After Change


    // convert to list
    // needed when creating a mapping through the iteration
    if isinstance(by, str):
        by = [by]
    // this is a temporary measure, till the minimum Pandas version is 1.1,
    // which supports null values in the group by
    // If any of the grouping columns has null values, we temporarily
    // replace the values with some outrageous value, that should not exist
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: ericmjl/pyjanitor
Commit Name: 516b77610d058cfe3a6f379e8ff9753065d48707
Time: 2020-08-09
Author: samueloranyeli@gmail.com
File Name: janitor/functions.py
Class Name:
Method Name: groupby_agg


Project Name: has2k1/plotnine
Commit Name: a85342eee955a8630719678d96cd96e96cdcf6b2
Time: 2019-08-14
Author: has2k1@gmail.com
File Name: plotnine/tests/test_annotation_stripes.py
Class Name:
Method Name: test_annotation_stripes_coord_flip


Project Name: GPflow/GPflow
Commit Name: c442e87d0b6a88e9787e8e82eb493e0dcf669c4d
Time: 2020-03-26
Author: dutordoirv@gmail.com
File Name: doc/source/notebooks/intro_to_gpflow2.pct.py
Class Name:
Method Name: