How can get ' USDJPY'(currency rates) with pandas and yahoo finance?

Yahoo Finance doesn't provide historical data on exchange rates (i.e. there's no "Historical Prices" link in the top left of the page like there would be for stocks, indices, etc...)

You can use FRED (Federal Reserve of St. Louis data) to get these exchange rates...

import pandas.io.data as web

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

UPDATE: hase moved the pandas-datareader

from pandas_datareader import data
jpy = data.DataReader('DEXJPUS', 'fred')

or the more direct way...

jpy = web.get_data_fred('DEXJPUS')

A list of all of the exchange rate that FRED has daily data for can be found here: http://research.stlouisfed.org/fred2/categories/94


Yahoo Finance doesn't provide historical data on exchange rates

Yes it does but not on cross rates. All vs the USD List of Yahoo USD Exchange Rates

a = web.DataReader("JPY=X", 'yahoo')