def _translate_header_datapoints(ingredient, dictionary, duplicated):
    """Translating Datapoints.

    1. rename the columns in dataframe
    2. check duplication in the origin data.keys()
    3. rename the key in data.keys()
    """
    data = ingredient.get_data()
    new_data = dict()
    for k in list(data.keys()):
        df_new = data[k].rename(columns=dictionary)
        if k not in dictionary.keys():
            new_data[k] = df_new
            continue
        new_name = dictionary[k]
        if new_name in data.keys():
            if duplicated == 'error':
                raise ValueError(
                    'can not rename indicator {} to {} because {} already exists!'
                    .format(k, new_name, new_name))
            else:
                new_data[new_name] = df_new
        else:
            new_data[new_name] = df_new
    return new_data
