0

I have a dataset like:

a = DataFrame({'clicks': {0: 12, 1: 19, 2: 14},
               'country ': {0: 'norway', 1: 'sweden', 2: 'italy'},
                 'date': {0: '2/2/2016', 1: '2/3/2016', 2: '2/4/2016'}})

I would like to add a new column to a, in order to get the exchange rates to Euro for those countries, looking like:

a = DataFrame({'clicks': {0: 12, 1: 19, 2: 14},
               'country ': {0: 'norway', 1: 'sweden', 2: 'italy'},
               'date': {0: '2/2/2016', 1: '2/3/2016', 2: '2/4/2016'},
               'exchangerate': {0: 0.92400000000000004, 1: 0.91700000000000004, 2: 1.0}})

I was thinking about using:

import pandas.io.data as web

jp = web.DataReader('DEXJPUS', 'fred')

but I can't find anything about EUR and other European currencies + linking to my df and getting daily data.

Cleb
  • 25,102
  • 20
  • 116
  • 151
chopin_is_the_best
  • 1,951
  • 2
  • 23
  • 39
  • Have a look at: http://stackoverflow.com/questions/3139879/how-do-i-get-currency-exchange-rates-via-an-api-such-as-google-finance – Peque Feb 15 '16 at 12:03
  • 1
    Check out `Quandl` if you do not find desired FX rates at Yahoo! or Google – Sergey Bushmanov Feb 15 '16 at 13:09
  • @SergeyBushmanov its a very useful resource but I dont manage to find euro vs. other european currencies either in FRED or Quandl – chopin_is_the_best Feb 15 '16 at 13:38
  • Would you please give an exact list of what you mean by `EUR and other European currencies` crossrates? Because in your example I see Italy. Don't they have EUR as their currency??? – Sergey Bushmanov Feb 15 '16 at 14:11

0 Answers0