def apply_default_values(table, default_values):
    """
    Iterate through a table and use the default values as defined in
    launcher.json for non-mandatory columns. This is required otherwise
    the payload would not be constructed correctly and the post would fail.

    For the remaining non-mandatory columns that have no default value
    defined, replace the cell content with an empty string, otherwise
    'None' would be used, breaking the payload structure.

    Args:
        table(dict): the table as called via the get_table() function
        default_values (dict): as extracted from launcher.json

    Returns:
        table(dict): revised dictionary with updated default values

    """
    for row in sorted(table):
        for d in default_values:
            current_value = table[row].get(d)
            if not current_value:
                new_value = default_values[d]
                table[row][d] = new_value

        # Convert remaining rows that have value of None to empty string: ''
        for k,v in sorted(table[row].items()):
            if not v:
                table[row][k] = ''
    return table