@@ -43,7 +43,7 @@ class YahooDailyReader(_DailyBaseReader):
43
43
Number of symbols to download consecutively before intiating pause.
44
44
interval : string, default 'd'
45
45
Time interval code, valid values are 'd' for daily, 'w' for weekly,
46
- 'm' for monthly and 'v' for dividend .
46
+ 'm' for monthly.
47
47
"""
48
48
49
49
def __init__ (self , symbols = None , start = None , end = None , retry_count = 3 ,
@@ -146,15 +146,16 @@ def _read_one_data(self, symbol):
146
146
prices .columns = map (str .capitalize , prices .columns )
147
147
prices ['Date' ] = to_datetime (prices ['Date' ], unit = 's' ).dt .date
148
148
149
- prices = prices [prices ['Data' ].isnull ()]
149
+ if 'Data' in prices .columns :
150
+ prices = prices [prices ['Data' ].isnull ()]
150
151
prices = prices [['Date' , 'High' , 'Low' , 'Open' , 'Close' , 'Volume' ,
151
152
'Adjclose' ]]
152
153
prices = prices .rename (columns = {'Adjclose' : 'Adj Close' })
153
154
154
155
dfs = {'prices' : prices }
155
156
156
157
# dividends & splits data
157
- if self .get_actions :
158
+ if self .get_actions and data [ 'eventsData' ] :
158
159
actions = DataFrame (data ['eventsData' ])
159
160
actions .columns = map (str .capitalize , actions .columns )
160
161
actions ['Date' ] = to_datetime (actions ['Date' ], unit = 's' ).dt .date
@@ -202,7 +203,6 @@ def _dl_mult_symbols(self, symbols):
202
203
dfs [k ] = concat (stocks [k ]).set_index (['Ticker' , 'Date' ])
203
204
return dfs
204
205
205
-
206
206
def _adjust_prices (hist_data , price_list = None ):
207
207
"""
208
208
Return modifed DataFrame or Panel with adjusted prices based on
0 commit comments