Skip to content

Commit aa24414

Browse files
TST: Add test for get_data_google dtypes
1 parent 4faf620 commit aa24414

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

doc/source/whatsnew/v0.15.2.txt

+1
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,4 @@ Bug Fixes
6363
- Bug in slicing a multi-index with an empty list and at least one boolean indexer (:issue:`8781`)
6464
- ``io.data.Options`` now raises ``RemoteDataError`` when no expiry dates are available from Yahoo (:issue:`8761`).
6565
- ``Timedelta`` kwargs may now be numpy ints and floats (:issue:`8757`).
66+
- Bug where ``get_data_google``returned object dtypes (:issue:`3995`)

pandas/io/tests/test_data.py

+8
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,14 @@ def test_get_multi2(self):
117117
self.assertEqual((4, 3), result.shape)
118118
assert_n_failed_equals_n_null_columns(w, result)
119119

120+
def test_dtypes(self):
121+
#GH3995
122+
data = web.get_data_google('MSFT', 'JAN-01-12', 'JAN-31-12')
123+
assert np.issubdtype(data.Open.dtype, np.number)
124+
assert np.issubdtype(data.Close.dtype, np.number)
125+
assert np.issubdtype(data.Low.dtype, np.number)
126+
assert np.issubdtype(data.High.dtype, np.number)
127+
assert np.issubdtype(data.Volume.dtype, np.number)
120128

121129
class TestYahoo(tm.TestCase):
122130
@classmethod

0 commit comments

Comments
 (0)