def change_currency(value, idx_map, year, direction):
    """
    Special kind of transformation that converts values in a given year, works only between euro and dollar
    :param value: original value
    :param idx_map: index map from create_index_map
    :param year: Year of transformation
    :param direction: "EURUSD" as default to convert euroes into usd, "USDEUR" to do the inverese
    :return: New Value
    """
    change = idx_map.loc[(idx_map["YEAR"] == year), "EURUSD"].values[0]
    if direction == "USDEUR":
        change = 1/change

    return value * change