I have DataFrame with two columns:
col1 | col2
20 EUR
31 GBP
5 JPY
I may have 10000 rows like this
How to do fast currency conversion to base currency being GBP?
should I use easymoney? I know how to apply conversion to single row but I do not know how to iterate through all the rows fast.
EDIT: I would like to apply sth as:
def convert_currency(amount, currency_symbol):
converted = ep.currency_converter(amount=1000, from_currency=currency_symbol, to_currency="GBP")
return converted
df.loc[df.currency != 'GBP', 'col1'] = convert_currency(currency_data.col1, df.col2
)
but it does not work yet.