def import_dict(line):
    """ Converts line of a csv file to a dict
    :param line: line of csv file
    :return: dictionary
    """

    dictionary = {}

    elements = line.split(',')
    for element in elements:
        try:
            key, value = element.split(':')
            dictionary[key] = int(value)
        except ValueError:
            pass

    return dictionary