4a24e4e36ee175aef54b92eb03e08a2be7811a96,recordlinkage/datasets/febrl.py,,_febrl_links,#Any#,27
Before Change
org_bool = df_empty["rec_id"].str.endswith("org")
// merge the two frame and make MultiIndex.
pairs = df_empty[org_bool].merge(df_empty[~org_bool], on="key")
pairs_mi = pairs.set_index(["rec_id_x", "rec_id_y"]).index
pairs_mi.names = [None, None]
return pairs_mi
After Change
index = df.index.to_series()
keys = index.str.extract(r"rec-(\d+)", expand=True)[0]
index_int = numpy.arange(len(df))
df_helper = pandas.DataFrame({
"key": keys,
"index": index_int
})
// merge the two frame and make MultiIndex.
pairs_df = df_helper.merge(
df_helper, on="key"
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: J535D165/recordlinkage
Commit Name: 4a24e4e36ee175aef54b92eb03e08a2be7811a96
Time: 2018-03-10
Author: jonathandebruinhome@gmail.com
File Name: recordlinkage/datasets/febrl.py
Class Name:
Method Name: _febrl_links
Project Name: kengz/SLM-Lab
Commit Name: 861657d2c9b321961994c8cdd0e58b6c4fe0645f
Time: 2018-09-03
Author: kengzwl@gmail.com
File Name: slm_lab/env/__init__.py
Class Name: EnvSpace
Method Name: __init__
Project Name: dask/distributed
Commit Name: 0696a1f6456b8010b19ac47b14cd2dca0d859246
Time: 2019-06-06
Author: mrocklin@gmail.com
File Name: distributed/deploy/adaptive.py
Class Name: Adaptive
Method Name: recommendations