43ae81ebbe860010aaaa3d739284ebeb8284e59e,plotnine/facets/facet.py,,unique_combs,#Any#,556

Before Change


    _df = df.ix[0:-1, df.columns]

    // List of unique values from every column
    lst = [x.unique().tolist() for x in (df[c] for c in df)]
    rows = itertools.product(*lst)
    for i, row in enumerate(rows):
        _df.loc[i] = row

After Change


    of the values in the columns
    
    // List of unique values from every column
    lst = (x.unique() for x in (df[c] for c in df))
    rows = list(itertools.product(*lst))
    _df = pd.DataFrame(rows, columns=df.columns)

    // preserve the column dtypes
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: has2k1/plotnine
Commit Name: 43ae81ebbe860010aaaa3d739284ebeb8284e59e
Time: 2017-05-07
Author: has2k1@gmail.com
File Name: plotnine/facets/facet.py
Class Name:
Method Name: unique_combs


Project Name: chartbeat-labs/textacy
Commit Name: 810aa052498c41e66e38662920a7ba52b0d48e21
Time: 2018-02-13
Author: burton@chartbeat.com
File Name: textacy/network.py
Class Name:
Method Name: sents_to_semantic_network


Project Name: NervanaSystems/coach
Commit Name: 67eb9e4c28098d93ac122d65833c20b22b7e86c7
Time: 2018-11-19
Author: sina.beh@gmail.com
File Name: rl_coach/architectures/mxnet_components/architecture.py
Class Name: MxnetArchitecture
Method Name: _dummy_model_inputs