f2f419b89221602dc31c69de32df1cba281db481,upsetplot/tests/test_data.py,,test_from_contents,#,90
Before Change
empty_data = pd.DataFrame(index=["aa", "bb", "cc", "dd", "ee", "ff"])
out = from_contents(OrderedDict(contents), data=empty_data,
id_column=id_column)
out2 = from_memberships(memberships=[{"cat1"},
{"cat1"},
{"cat1", "cat2"},
{"cat2"},
{"cat3"},
[]],
data=empty_data)
assert_series_equal(out[id_column].reset_index(drop=True),
pd.Series(["aa", "bb", "cc", "dd", "ee", "ff"],
name=id_column))
assert_frame_equal(out.drop(columns=[id_column]), out2)
After Change
def test_from_contents(typ=set, id_column="id"):
contents = {"cat1": {"aa", "bb", "cc"},
"cat2": {"cc", "dd"},
"cat3": {"ee"},
}
empty_data = pd.DataFrame(index=["aa", "bb", "cc", "dd", "ee"])
baseline = from_contents(OrderedDict(contents), data=empty_data,
id_column=id_column)
// data=None
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 4
Instances
Project Name: jnothman/UpSetPlot
Commit Name: f2f419b89221602dc31c69de32df1cba281db481
Time: 2019-05-30
Author: joel.nothman@gmail.com
File Name: upsetplot/tests/test_data.py
Class Name:
Method Name: test_from_contents
Project Name: pgmpy/pgmpy
Commit Name: 6a5216e488b7f1cd388cb817581d7988ce0353b5
Time: 2014-08-20
Author: ankurankan@gmail.com
File Name: pgmpy/MarkovModel/MarkovModel.py
Class Name: MarkovModel
Method Name: __init__
Project Name: databricks/spark-deep-learning
Commit Name: a5a6e074ed792733fc2547e1544711d52659d3fd
Time: 2017-07-11
Author: sueann@databricks.com
File Name: python/sparkdl/transformers/keras_applications.py
Class Name:
Method Name:
Project Name: Pinafore/qb
Commit Name: e274abd78ec052dadae737b83a50531f0f8d7666
Time: 2018-02-02
Author: sjtufs@gmail.com
File Name: qanta/guesser/tied.py
Class Name:
Method Name:
Project Name: onnx/onnx-coreml
Commit Name: 7f7a30cae66e7d65917ceea966225292f582d809
Time: 2019-10-04
Author: bhushan.s.94@gmail.com
File Name: onnx_coreml/_transformers.py
Class Name: DeadCodeElimination
Method Name: __call__