a871536bcbb38b9ca03b0bc777712d8c0a79ad90,matchzoo/data_pack/pack.py,,pack,#Any#,17

Before Change


        col_all.append("label")

    // prepare data pack.
    df = pd.DataFrame(data, columns=col_all)
    df.fillna("missing")  // avoid tokenization exception.

    // Segment input into 3 dataframes.
    relation = df[col_relation]

    left = df[["id_left", "text_left"]].drop_duplicates(["id_left"])
    left.set_index("id_left", inplace=True)
    // Infer the length of the text left
    // left["length_left"] = left.apply(lambda r: len(r["text_left"]), axis=1)

After Change


    if "id_left" not in df:
        id_left = _gen_ids(df, "text_left", "L-")
    else:
        id_left = df["id_left"]
    if "id_right" not in df:
        id_right = _gen_ids(df, "text_right", "R-")
    else:
        id_right = df["id_right"]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: NTMC-Community/MatchZoo
Commit Name: a871536bcbb38b9ca03b0bc777712d8c0a79ad90
Time: 2018-12-13
Author: i@uduse.com
File Name: matchzoo/data_pack/pack.py
Class Name:
Method Name: pack


Project Name: autonomio/talos
Commit Name: d0f18bacbf87118ba071a3450b52a1778f8cdf55
Time: 2019-04-10
Author: mailme@mikkokotila.com
File Name: talos/logging/results.py
Class Name:
Method Name: result_todf


Project Name: google/deepvariant
Commit Name: e2eab73f998e1ba9d3c47f2c96aa84027ec58c17
Time: 2019-09-27
Author: marianattestad@google.com
File Name: deepvariant/vcf_stats_vis_test.py
Class Name: VcfStatsVisTest
Method Name: test_build_type_chart


Project Name: google/deepvariant
Commit Name: e2eab73f998e1ba9d3c47f2c96aa84027ec58c17
Time: 2019-09-27
Author: marianattestad@google.com
File Name: deepvariant/vcf_stats_vis_test.py
Class Name: VcfStatsVisTest
Method Name: test_build_tt_chart