def cleanup(row):
    """ Clean up the raw data from a single line from the crosscheck output

        For numbers, try to convert to int or float
        For files, remove the file:// prefix to get the exact path
    """
    remove = list()
    for field, value in row.items():
        # Store fields with empty values, to remove later. At this point value
        # is still a string, so "0" will not be removed
        if not value:
            remove.append(field)
        # Convert to int
        elif 'VALUE' in field:
            row[field] = int(value)
        # Convert to float
        elif 'LOD_SCORE' in field:
            row[field] = float(value)
        # Remove file:// prefix
        elif 'FILE' in field:
            if value.startswith('file://'):
                row[field] = value[7:]

    # Remove fields with empty values
    for field in remove:
        row.pop(field)

    return row