<commit_before>from data_collection.management.commands import BaseHalaroseCsvImporter

class Command(BaseHalaroseCsvImporter):
    council_id      = 'E07000145'
    addresses_name  = 'local.2018-05-03/Version 1/polling_station_export-2018-04-20.csv'
    stations_name   = 'local.2018-05-03/Version 1/polling_station_export-2018-04-20.csv'
    elections       = ['local.2018-05-03']
    csv_encoding    = 'windows-1252'

    def station_record_to_dict(self, record):

        if record.pollingstationnumber == '15':
            record = record._replace(pollingstationpostcode='')

        return super().station_record_to_dict(record)

    def address_record_to_dict(self, record):
        uprn = record.uprn.strip().lstrip('0')

        if record.houseid == '48125':
            rec = super().address_record_to_dict(record)
            rec['postcode'] = 'NR31 9EP'
            return rec

        if uprn == '100091559681':<commit_msg>postcode correction for Great Yarmouth<commit_after>from data_collection.management.commands import BaseHalaroseCsvImporter

class Command(BaseHalaroseCsvImporter):
    council_id      = 'E07000145'
    addresses_name  = 'local.2018-05-03/Version 1/polling_station_export-2018-04-20.csv'
    stations_name   = 'local.2018-05-03/Version 1/polling_station_export-2018-04-20.csv'
    elections       = ['local.2018-05-03']
    csv_encoding    = 'windows-1252'

    def station_record_to_dict(self, record):

        if record.pollingstationnumber == '15':
            record = record._replace(pollingstationpostcode='NR29 4NH')

        return super().station_record_to_dict(record)

    def address_record_to_dict(self, record):
        uprn = record.uprn.strip().lstrip('0')

        if record.houseid == '48125':
            rec = super().address_record_to_dict(record)
            rec['postcode'] = 'NR31 9EP'
            return rec

        if uprn == '100091559681':
{'fraction_non_alphanumeric': 0.11233595800524934, 'fraction_numerical': 0.08241469816272966, 'mean_word_length': 3.1077586206896552, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4743994', 'n_tokens_mistral': 715, 'n_tokens_neox': 609, 'n_words': 96}