Skip to content

Commit 9a9971d

Browse files
committed
CLN: Add all to data to prevent spurious deletion of import
Add __all__ to prevent spurious deletion of import and flake8 error
1 parent 75fc096 commit 9a9971d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

pandas_datareader/data.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,17 @@
1818
from pandas_datareader.oecd import OECDReader
1919
from pandas_datareader.quandl import QuandlReader
2020
from pandas_datareader.yahoo.actions import (YahooActionReader, YahooDivReader)
21+
from pandas_datareader.yahoo.components import _get_data as \
22+
get_components_yahoo
2123
from pandas_datareader.yahoo.daily import YahooDailyReader
2224
from pandas_datareader.yahoo.options import Options as YahooOptions
2325
from pandas_datareader.yahoo.quotes import YahooQuotesReader
2426

27+
__all__ = ['get_components_yahoo', 'get_data_enigma', 'get_data_famafrench',
28+
'get_data_fred', 'get_data_google', 'get_data_moex',
29+
'get_data_quandl', 'get_data_yahoo', 'get_data_yahoo_actions',
30+
'get_nasdaq_symbols', 'get_quote_google', 'get_quote_yahoo']
31+
2532

2633
def get_data_fred(*args, **kwargs):
2734
return FredReader(*args, **kwargs).read()
@@ -67,8 +74,10 @@ def DataReader(name, data_source=None, start=None, end=None,
6774
retry_count=3, pause=0.001, session=None, access_key=None):
6875
"""
6976
Imports data from a number of online sources.
77+
7078
Currently supports Yahoo! Finance, Google Finance, St. Louis FED (FRED),
7179
Kenneth French's data library, and the SEC's EDGAR Index.
80+
7281
Parameters
7382
----------
7483
name : str or list of strs
@@ -88,22 +97,29 @@ def DataReader(name, data_source=None, start=None, end=None,
8897
single value given for symbol, represents the pause between retries.
8998
session : Session, default None
9099
requests.sessions.Session instance to be used
100+
91101
Examples
92102
----------
103+
93104
# Data from Yahoo! Finance
94105
gs = DataReader("GS", "yahoo")
106+
95107
# Corporate Actions (Dividend and Split Data)
96108
# with ex-dates from Yahoo! Finance
97109
gs = DataReader("GS", "yahoo-actions")
110+
98111
# Data from Google Finance
99112
aapl = DataReader("AAPL", "google")
113+
100114
# Data from FRED
101115
vix = DataReader("VIXCLS", "fred")
116+
102117
# Data from Fama/French
103118
ff = DataReader("F-F_Research_Data_Factors", "famafrench")
104119
ff = DataReader("F-F_Research_Data_Factors_weekly", "famafrench")
105120
ff = DataReader("6_Portfolios_2x3", "famafrench")
106121
ff = DataReader("F-F_ST_Reversal_Factor", "famafrench")
122+
107123
# Data from EDGAR index
108124
ed = DataReader("full", "edgar-index")
109125
ed2 = DataReader("daily", "edgar-index")

0 commit comments

Comments
 (0)