86d4c5df21db07ab75e7eac9ed36d2799b4bf440,research/src/fetch_campaign_donations.py,Donation,data,#Donation#,90
Before Change
}
paths = (os.path.join(self.directory, filename) for filename in files)
keys = ("candidates", "parties", "committees")
return {
key: self._read_csv(path, chunksize=10000)
for path, key in zip(keys, paths)
}
After Change
// strip columns names ("foobar " -> "foobar")
names = data[key].columns.values
cleaned_columns = {name: name.strip() for name in names}
data[key].rename(columns=cleaned_columns, inplace=True)
// normalize & translate
data[key].rename(columns=normalize_columns, inplace=True)
data[key].rename(columns=TRANSLATIONS, inplace=True)
return data
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 2
Instances
Project Name: okfn-brasil/serenata-de-amor
Commit Name: 86d4c5df21db07ab75e7eac9ed36d2799b4bf440
Time: 2017-11-19
Author: cuducos@users.noreply.github.com
File Name: research/src/fetch_campaign_donations.py
Class Name: Donation
Method Name: data
Project Name: biocore/scikit-bio
Commit Name: b0d9f5c388202b9114f352fbbef23225fcb91f86
Time: 2014-05-29
Author: jai.rideout@gmail.com
File Name: skbio/math/stats/distance/base.py
Class Name:
Method Name: bioenv
Project Name: bokeh/bokeh
Commit Name: 061d916ba77932d50e41c83f476d8c0d55674856
Time: 2018-10-13
Author: xavart2011@gmail.com
File Name: examples/app/gapminder/main.py
Class Name:
Method Name: