You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OANDA is returning string when currency is above 1000, so when you try to reverse the currency ( 1/df ) it raise an error
Code example:
from pandas_datareader.oanda import get_oanda_currency_historical_rates
fx_rates = get_oanda_currency_historical_rates(start='1990-01-01', end=None, quote_currency='USD', base_currency='KRW')
Traceback (most recent call last):
File "C:\Anaconda2\lib\site-packages\IPython\core\interactiveshell.py", line 2881, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-2-14c50a5808d3>", line 3, in <module>
fx_rates = get_oanda_currency_historical_rates(start='1990-01-01', end=None, quote_currency='USD', base_currency='KRW')
File "C:\Anaconda2\lib\site-packages\pandas_datareader\oanda.py", line 52, in get_oanda_currency_historical_rates
df = 1 / df
File "C:\Anaconda2\lib\site-packages\pandas\core\ops.py", line 1097, in f
return self._combine_const(other, na_op)
File "C:\Anaconda2\lib\site-packages\pandas\core\frame.py", line 3555, in _combine_const
raise_on_error=raise_on_error)
File "C:\Anaconda2\lib\site-packages\pandas\core\internals.py", line 2911, in eval
return self.apply('eval', **kwargs)
File "C:\Anaconda2\lib\site-packages\pandas\core\internals.py", line 2890, in apply
applied = getattr(b, f)(**kwargs)
File "C:\Anaconda2\lib\site-packages\pandas\core\internals.py", line 1139, in eval
result = handle_error()
File "C:\Anaconda2\lib\site-packages\pandas\core\internals.py", line 1123, in handle_error
(repr(other), str(detail)))
The text was updated successfully, but these errors were encountered:
OANDA is returning string when currency is above 1000, so when you try to reverse the currency ( 1/df ) it raise an error
Code example:
The text was updated successfully, but these errors were encountered: