From aa24414d89c02539f6e9871774056f206bdc951b Mon Sep 17 00:00:00 2001 From: David Stephens Date: Tue, 11 Nov 2014 10:16:54 -0800 Subject: [PATCH] TST: Add test for get_data_google dtypes --- doc/source/whatsnew/v0.15.2.txt | 1 + pandas/io/tests/test_data.py | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/doc/source/whatsnew/v0.15.2.txt b/doc/source/whatsnew/v0.15.2.txt index fe1454d4d2582..df09168a50449 100644 --- a/doc/source/whatsnew/v0.15.2.txt +++ b/doc/source/whatsnew/v0.15.2.txt @@ -63,3 +63,4 @@ Bug Fixes - Bug in slicing a multi-index with an empty list and at least one boolean indexer (:issue:`8781`) - ``io.data.Options`` now raises ``RemoteDataError`` when no expiry dates are available from Yahoo (:issue:`8761`). - ``Timedelta`` kwargs may now be numpy ints and floats (:issue:`8757`). +- Bug where ``get_data_google``returned object dtypes (:issue:`3995`) diff --git a/pandas/io/tests/test_data.py b/pandas/io/tests/test_data.py index dbc439e6c872e..3fca0393339fc 100644 --- a/pandas/io/tests/test_data.py +++ b/pandas/io/tests/test_data.py @@ -117,6 +117,14 @@ def test_get_multi2(self): self.assertEqual((4, 3), result.shape) assert_n_failed_equals_n_null_columns(w, result) + def test_dtypes(self): + #GH3995 + data = web.get_data_google('MSFT', 'JAN-01-12', 'JAN-31-12') + assert np.issubdtype(data.Open.dtype, np.number) + assert np.issubdtype(data.Close.dtype, np.number) + assert np.issubdtype(data.Low.dtype, np.number) + assert np.issubdtype(data.High.dtype, np.number) + assert np.issubdtype(data.Volume.dtype, np.number) class TestYahoo(tm.TestCase): @classmethod