Skip to content

Commit dd857ba

Browse files
BUG: Bring pandas up to date with pandas_datareader
1 parent 8d2818e commit dd857ba

File tree

3 files changed

+2821
-10
lines changed

3 files changed

+2821
-10
lines changed

pandas/io/data.py

+7-10
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,14 @@ def _retry_read_url(url, retry_count, pause, name):
172172
if len(rs) > 2 and rs.index[-1] == rs.index[-2]: # pragma: no cover
173173
rs = rs[:-1]
174174

175-
#Get rid of unicode characters in index name.
176-
try:
177-
rs.index.name = rs.index.name.decode('unicode_escape').encode('ascii', 'ignore')
178-
except AttributeError:
179-
#Python 3 string has no decode method.
180-
rs.index.name = rs.index.name.encode('ascii', 'ignore').decode()
175+
#Get rid of unicode characters in index name.
176+
try:
177+
rs.index.name = rs.index.name.decode('unicode_escape').encode('ascii', 'ignore')
178+
except AttributeError:
179+
#Python 3 string has no decode method.
180+
rs.index.name = rs.index.name.encode('ascii', 'ignore').decode()
181181

182-
return rs
182+
return rs
183183

184184
raise IOError("after %d tries, %s did not "
185185
"return a 200 for url %r" % (retry_count, name, url))
@@ -701,9 +701,6 @@ def _option_frames_from_url(self, url):
701701
calls = frames[self._TABLE_LOC['calls']]
702702
puts = frames[self._TABLE_LOC['puts']]
703703

704-
if len(calls) == 0 or len(puts) == 0:
705-
raise RemoteDataError('Received no data from Yahoo at url: %s' % url)
706-
707704
calls = self._process_data(calls, 'call')
708705
puts = self._process_data(puts, 'put')
709706

0 commit comments

Comments
 (0)