diff --git a/python/pyspark/sql/tests.py b/python/pyspark/sql/tests.py index e06900a403901..fc6e575c08035 100644 --- a/python/pyspark/sql/tests.py +++ b/python/pyspark/sql/tests.py @@ -2587,6 +2587,7 @@ def _to_pandas(self): @unittest.skipIf(not _have_pandas, "Pandas not installed") def test_to_pandas(self): + import numpy as np pdf = self._to_pandas() types = pdf.dtypes self.assertEquals(types[0], np.int32)