pydata / pandas-datareader

Extract data from a wide range of Internet sources into a pandas DataFrame.
https://pydata.github.io/pandas-datareader/stable/index.html
Other
2.94k stars 681 forks source link

Quandl datareader cannot get ticker symbols with underscores #732

Open orensol opened 4 years ago

orensol commented 4 years ago

When trying to retrieve Quandl data, using their specified symbol codes with underscores (such as BRK_B), there is an AssertionError thrown:

import pandas_datareader.data as web
price_data = web.DataReader(name='BRK_B', data_source='quandl', start='2018-01-01', end='2018-12-31')

Error returned:

.../quandl.py", line 77, in url assert mm, "Symbol '%s' must conform to Quandl convention 'DB/SYM'" % symbol AssertionError: Symbol 'BRK_B' must conform to Quandl convention 'DB/SYM'

An-naili commented 4 years ago

Hi,

I recon the problem is that you need the full symbol name. In you case, I think it should be 'CBARH/BRK_B'.