Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.15.2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ Experimental
Bug Fixes
~~~~~~~~~
- Bug in ``groupby`` signatures that didn't include *args or **kwargs (:issue:`8733`).
- ``io.data.Options`` now raises ``RemoteDataError`` when no expiry dates are available from Yahoo (:issue:`8761`).
- ``io.data.Options`` now raises ``RemoteDataError`` when no expiry dates are available from Yahoo and when it receives no data from Yahoo (:issue:`8761`), (:issue:`8783`).
- Bug in slicing a multi-index with an empty list and at least one boolean indexer (:issue:`8781`)
10 changes: 8 additions & 2 deletions pandas/io/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,8 +685,14 @@ def _option_frames_from_url(self, url):
except IndexError:
self.underlying_price, self.quote_time = np.nan, np.nan

calls = self._process_data(frames[self._TABLE_LOC['calls']], 'call')
puts = self._process_data(frames[self._TABLE_LOC['puts']], 'put')
calls = frames[self._TABLE_LOC['calls']]
puts = frames[self._TABLE_LOC['puts']]

if len(calls) == 0 or len(puts) == 0:
raise RemoteDataError('Received no data from Yahoo at url: %s' % url)

calls = self._process_data(calls, 'call')
puts = self._process_data(puts, 'put')

return {'calls': calls, 'puts': puts}

Expand Down