88from pandas_datareader .edgar import EdgarIndexReader
99from pandas_datareader .enigma import EnigmaReader
1010from pandas_datareader .eurostat import EurostatReader
11+ from pandas_datareader .exceptions import ImmediateDeprecationError , \
12+ DEP_ERROR_MSG
1113from pandas_datareader .famafrench import FamaFrenchReader
1214from pandas_datareader .fred import FredReader
1315from pandas_datareader .google .daily import GoogleDailyReader
@@ -51,6 +53,7 @@ def get_data_google(*args, **kwargs):
5153
5254
5355def get_data_yahoo (* args , ** kwargs ):
56+ raise ImmediateDeprecationError (DEP_ERROR_MSG .format ('Yahoo Actions' ))
5457 return YahooDailyReader (* args , ** kwargs ).read ()
5558
5659
@@ -59,14 +62,17 @@ def get_data_enigma(*args, **kwargs):
5962
6063
6164def get_data_yahoo_actions (* args , ** kwargs ):
65+ raise ImmediateDeprecationError (DEP_ERROR_MSG .format ('Yahoo Actions' ))
6266 return YahooActionReader (* args , ** kwargs ).read ()
6367
6468
6569def get_quote_yahoo (* args , ** kwargs ):
70+ raise ImmediateDeprecationError (DEP_ERROR_MSG .format ('Yahoo Actions' ))
6671 return YahooQuotesReader (* args , ** kwargs ).read ()
6772
6873
6974def get_quote_google (* args , ** kwargs ):
75+ raise ImmediateDeprecationError (DEP_ERROR_MSG .format ('Google Quotes' ))
7076 return GoogleQuotesReader (* args , ** kwargs ).read ()
7177
7278
@@ -210,17 +216,16 @@ def DataReader(name, data_source=None, start=None, end=None,
210216 """
211217 Imports data from a number of online sources.
212218
213- Currently supports Yahoo! Finance, Google Finance, St. Louis FED (FRED),
214- Kenneth French's data library, and the SEC's EDGAR Index .
219+ Currently supports Google Finance, St. Louis FED (FRED),
220+ and Kenneth French's data library, among others .
215221
216222 Parameters
217223 ----------
218224 name : str or list of strs
219- the name of the dataset. Some data sources (yahoo, google, fred) will
225+ the name of the dataset. Some data sources (google, fred) will
220226 accept a list of names.
221227 data_source: {str, None}
222- the data source ("yahoo", "yahoo-actions", "yahoo-dividends",
223- "google", "fred", "ff", or "edgar-index")
228+ the data source ("google", "fred", "ff")
224229 start : {datetime, None}
225230 left boundary for range (defaults to 1/1/2010)
226231 end : {datetime, None}
@@ -237,14 +242,6 @@ def DataReader(name, data_source=None, start=None, end=None,
237242
238243 Examples
239244 ----------
240-
241- # Data from Yahoo! Finance
242- gs = DataReader("GS", "yahoo")
243-
244- # Corporate Actions (Dividend and Split Data)
245- # with ex-dates from Yahoo! Finance
246- gs = DataReader("GS", "yahoo-actions")
247-
248245 # Data from Google Finance
249246 aapl = DataReader("AAPL", "google")
250247
@@ -263,23 +260,23 @@ def DataReader(name, data_source=None, start=None, end=None,
263260 ff = DataReader("F-F_Research_Data_Factors_weekly", "famafrench")
264261 ff = DataReader("6_Portfolios_2x3", "famafrench")
265262 ff = DataReader("F-F_ST_Reversal_Factor", "famafrench")
266-
267- # Data from EDGAR index
268- ed = DataReader("full", "edgar-index")
269- ed2 = DataReader("daily", "edgar-index")
270263 """
271264 if data_source == "yahoo" :
265+ raise ImmediateDeprecationError (DEP_ERROR_MSG .format ('Yahoo Daily' ))
272266 return YahooDailyReader (symbols = name , start = start , end = end ,
273267 adjust_price = False , chunksize = 25 ,
274268 retry_count = retry_count , pause = pause ,
275269 session = session ).read ()
276270
277271 elif data_source == "yahoo-actions" :
272+ raise ImmediateDeprecationError (DEP_ERROR_MSG .format ('Yahoo Actions' ))
278273 return YahooActionReader (symbols = name , start = start , end = end ,
279274 retry_count = retry_count , pause = pause ,
280275 session = session ).read ()
281276
282277 elif data_source == "yahoo-dividends" :
278+ comp = 'Yahoo Dividends'
279+ raise ImmediateDeprecationError (DEP_ERROR_MSG .format (comp ))
283280 return YahooDivReader (symbols = name , start = start , end = end ,
284281 adjust_price = False , chunksize = 25 ,
285282 retry_count = retry_count , pause = pause ,
@@ -337,6 +334,7 @@ def DataReader(name, data_source=None, start=None, end=None,
337334 retry_count = retry_count , pause = pause ,
338335 session = session ).read ()
339336 elif data_source == "edgar-index" :
337+ raise ImmediateDeprecationError (DEP_ERROR_MSG .format ('EDGAR' ))
340338 return EdgarIndexReader (symbols = name , start = start , end = end ,
341339 retry_count = retry_count , pause = pause ,
342340 session = session ).read ()
@@ -364,8 +362,10 @@ def Options(symbol, data_source=None, session=None):
364362 " data_source) instead" , FutureWarning , stacklevel = 2 )
365363 data_source = "yahoo"
366364 if data_source == "yahoo" :
365+ raise ImmediateDeprecationError (DEP_ERROR_MSG .format ('Yahoo Options' ))
367366 return YahooOptions (symbol , session = session )
368367 elif data_source == "google" :
368+ raise ImmediateDeprecationError (DEP_ERROR_MSG .format ('Google Options' ))
369369 return GoogleOptions (symbol , session = session )
370370 else :
371371 raise NotImplementedError ("currently only yahoo and google supported" )
0 commit comments