aaacfe1dd17783d43772cd4083a96b4b5b2e5c34,research/src/fetch_campaign_donations.py,,,#,256

Before Change


                                                   donations_data_2012["candidates"],  // noqa
                                                   donations_data_2014["candidates"],  // noqa
                                                   donations_data_2016["candidates"]])  // noqa
    donations_parties_concatenated = pd.concat([donations_data_2010["parties"],
                                                donations_data_2012["parties"],
                                                donations_data_2014["parties"],
                                                donations_data_2016["parties"]])  // noqa
    donations_committees_concatenated = pd.concat([donations_data_2010["committees"],  // noqa
                                                   donations_data_2012["committees"],  // noqa
                                                   donations_data_2014["committees"]])  // noqa

After Change


    url = base_url + "prestacao_contas_final_2016.zip"
    donations_data_2016 = download_base(url, "2016")

    donations_data = [donations_data_2010, donations_data_2012,
                      donations_data_2014, donations_data_2016]

    donations_candidates_concatenated = []
    donations_parties_concatenated = []
    donations_committees_concatenated = []

    for data in donations_data:
        correct_columns(data)
        translate_columns(data)
        if "candidates" in data.keys():
            donations_candidates_concatenated.append(data["candidates"])
        if "parties" in data.keys():
            donations_parties_concatenated.append(data["parties"])
        if "committees" in data.keys():
            donations_committees_concatenated.append(data["committees"])

    donations_candidates_concatenated = pd.concat(donations_candidates_concatenated)  // noqa
    donations_parties_concatenated = pd.concat(donations_parties_concatenated)
    donations_committees_concatenated = pd.concat(donations_committees_concatenated)  // noqa
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: okfn-brasil/serenata-de-amor
Commit Name: aaacfe1dd17783d43772cd4083a96b4b5b2e5c34
Time: 2017-10-30
Author: europio123@gmail.com
File Name: research/src/fetch_campaign_donations.py
Class Name:
Method Name:


Project Name: keras-team/autokeras
Commit Name: 41c99fbf385a8c875fb6181ce7301e4bc218535b
Time: 2020-04-18
Author: jhfjhfj1@gmail.com
File Name: autokeras/keras_layers.py
Class Name: CategoricalEncoding
Method Name: call