diff --git a/pyathena/result_set.py b/pyathena/result_set.py index 77ed7631..f9e860e1 100644 --- a/pyathena/result_set.py +++ b/pyathena/result_set.py @@ -455,7 +455,8 @@ def _as_pandas(self): dtype=self.dtypes, converters=self.converters, parse_dates=self.parse_dates, - infer_datetime_format=True) + infer_datetime_format=True, + skip_blank_lines=False) df = self._trunc_date(df) else: # Allow empty response df = pd.DataFrame() diff --git a/tests/test_pandas_cursor.py b/tests/test_pandas_cursor.py index 0ad4961f..02535185 100644 --- a/tests/test_pandas_cursor.py +++ b/tests/test_pandas_cursor.py @@ -386,3 +386,10 @@ def test_executemany_fetch(self, cursor): self.assertRaises(ProgrammingError, cursor.fetchmany) self.assertRaises(ProgrammingError, cursor.fetchone) self.assertRaises(ProgrammingError, cursor.as_pandas) + + @with_pandas_cursor() + def test_not_skip_blank_lines(self, cursor): + cursor.execute(""" + select * from (values (1), (NULL)) + """) + self.assertEqual(len(cursor.fetchall()), 2)