srs_metadata_cleaning.py
def write_sifting_responses(combined_values, filename_2):
    """
    Writes the check values corresponding to URI onto a spreadsheet.

    Source for help constructing this function:
    Jon Fincher, "Reading and Writing CSV Files in Python,"
    Real Python, accessed October 13, 2020,
    https://realpython.com/python-csv/

    Parameters
    ----------
    combined_values: list
        A list of URIs and volume/edition check values corresponding to each title.
    filename_2: string
        The desired CSV file to which to write the check values

    Returns
    ----------
    filename_2: CSV
        A spreadsheet file with the check values organized by URI.
    """

    with open(filename_2, 'w', encoding = 'utf-8') as csv_file:

        fieldnames = ["uri", "check_full_titles_for_volume_info?", "check_copyright_ocr_for_edition_info?", "check_fm_and_marc_titles_for_differences?"]

        writer = csv.DictWriter(csv_file, fieldnames = fieldnames)

        writer.writeheader()

        for combined_value in combined_values:
            writer.writerow({"uri": combined_value[0],
            "check_full_titles_for_volume_info?": combined_value[1],
            "check_copyright_ocr_for_edition_info?": combined_value[2],
            "check_fm_and_marc_titles_for_differences?": combined_value[3]})

    return filename_2

    Writes the check values corresponding to URI onto a spreadsheet.

    Source for help constructing this function:
    Jon Fincher, "Reading and Writing CSV Files in Python,"
    Real Python, accessed October 13, 2020,
    https://realpython.com/python-csv/

    Parameters
    ----------
    combined_values: list
        A list of URIs and volume/edition check values corresponding to each title.
    filename_2: string
        The desired CSV file to which to write the check values

    Returns
    ----------
    filename_2: CSV
        A spreadsheet file with the check values organized by URI.
    
Writes the check values corresponding to URI onto a spreadsheet.
Writes the check values corresponding to URI onto a spreadsheet .
def write_sifting_responses(combined_values, filename_2):
    with open(filename_2, 'w', encoding = 'utf-8') as csv_file:
        fieldnames = ["uri", "check_full_titles_for_volume_info?", "check_copyright_ocr_for_edition_info?", "check_fm_and_marc_titles_for_differences?"]
        writer = csv.DictWriter(csv_file, fieldnames = fieldnames)
        writer.writeheader()
        for combined_value in combined_values:
            writer.writerow({"uri": combined_value[0],
            "check_full_titles_for_volume_info?": combined_value[1],
            "check_copyright_ocr_for_edition_info?": combined_value[2],
            "check_fm_and_marc_titles_for_differences?": combined_value[3]})
    return filename_2
def write_sifting_responses ( combined_values , filename_2 ) : with open ( filename_2 , 'w' , encoding = 'utf-8' ) as csv_file : fieldnames = [ "uri" , "check_full_titles_for_volume_info?" , "check_copyright_ocr_for_edition_info?" , "check_fm_and_marc_titles_for_differences?" ] writer = csv . DictWriter ( csv_file , fieldnames = fieldnames ) writer . writeheader ( ) for combined_value in combined_values : writer . writerow ( { "uri" : combined_value [ 0 ] , "check_full_titles_for_volume_info?" : combined_value [ 1 ] , "check_copyright_ocr_for_edition_info?" : combined_value [ 2 ] , "check_fm_and_marc_titles_for_differences?" : combined_value [ 3 ] } ) return filename_2
Writes the check values corresponding to URI onto a spreadsheet.
Writes the check values corresponding to URI onto a spreadsheet .
"""
    Writes the check values corresponding to URI onto a spreadsheet.

    Source for help constructing this function:
    Jon Fincher, "Reading and Writing CSV Files in Python,"
    Real Python, accessed October 13, 2020,
    https://realpython.com/python-csv/

    Parameters
    ----------
    combined_values: list
        A list of URIs and volume/edition check values corresponding to each title.
    filename_2: string
        The desired CSV file to which to write the check values

    Returns
    ----------
    filename_2: CSV
        A spreadsheet file with the check values organized by URI.
    """
combined_values
A list of URIs and volume/edition check values corresponding to each title.
A list of URIs and volume / edition check values corresponding to each title .
filename_2
A spreadsheet file with the check values organized by URI.
A spreadsheet file with the check values organized by URI .
Returns

None
----------

None