Skip to content

Commit 4f3bbb5

Browse files
committed
FIX dtypes if there are missing values from Google by @dstephens99
pandas-dev/pandas@84b4c2d
1 parent 1ff2f72 commit 4f3bbb5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pandas_datareader/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def _retry_read_url(url, retry_count, pause, name):
166166
pass
167167
else:
168168
rs = read_csv(StringIO(bytes_to_str(lines)), index_col=0,
169-
parse_dates=True)[::-1]
169+
parse_dates=True, na_values='-')[::-1]
170170
# Yahoo! Finance sometimes does this awesome thing where they
171171
# return 2 rows for the most recent business day
172172
if len(rs) > 2 and rs.index[-1] == rs.index[-2]: # pragma: no cover

pandas_datareader/tests/test_data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ def test_get_multi2(self):
124124
assert_n_failed_equals_n_null_columns(w, result)
125125

126126
def test_dtypes(self):
127-
#GH3995
128-
data = web.get_data_google('MSFT', 'JAN-01-12', 'JAN-31-12')
127+
#GH399, #GH8980
128+
data = web.get_data_google('F', start='JAN-01-10', end='JAN-27-13')
129129
assert np.issubdtype(data.Open.dtype, np.number)
130130
assert np.issubdtype(data.Close.dtype, np.number)
131131
assert np.issubdtype(data.Low.dtype, np.number)

0 commit comments

Comments
 (0)