9def69a805132ff7549744b5b30a2fa7531fa405,tests/test_preprocess.py,,test_tmpreproc_en_tokens_dataframe,#Any#,525
Before Change
assert list(df.columns) == ["token"]
assert len(df.token) == sum(doc_lengths.values())
ind0 = df.index.get_level_values(0)
labels, lens = zip(*sorted(doc_lengths.items(), key=lambda x: x[0]))
assert np.array_equal(ind0.to_numpy(), np.repeat(labels, lens))
ind1 = df.index.get_level_values(1)
After Change
df_as_list = df.to_list()
ind0 = df_as_list[0]
labels, lens = zip(*sorted(doc_lengths.items(), key=lambda x: x[0]))
assert np.array_equal(ind0, np.repeat(labels, lens))
ind1 = df_as_list[1]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: WZBSocialScienceCenter/tmtoolkit
Commit Name: 9def69a805132ff7549744b5b30a2fa7531fa405
Time: 2019-06-12
Author: markus.konrad@wzb.eu
File Name: tests/test_preprocess.py
Class Name:
Method Name: test_tmpreproc_en_tokens_dataframe
Project Name: dmnfarrell/pandastable
Commit Name: c3631780801e0f981fd8e32fd51e682c67b4339c
Time: 2015-08-27
Author: farrell.damien@gmail.com
File Name: pandastable/headers.py
Class Name: ColumnHeader
Method Name: redraw
Project Name: IBM/AIF360
Commit Name: 8fe072260ad6d72dbf3efd7e9ff4df12d9173438
Time: 2020-02-19
Author: hoffman.sc@gmail.com
File Name: aif360/sklearn/tests/test_metrics.py
Class Name:
Method Name: