Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/18664#discussion_r147126889
--- Diff: python/pyspark/sql/dataframe.py ---
@@ -1880,11 +1880,13 @@ def toPandas(self):
import pandas as pd
if self.sql_ctx.getConf("spark.sql.execution.arrow.enabled",
"false").lower() == "true":
try:
+ from pyspark.sql.types import
_check_dataframe_localize_timestamps
import pyarrow
tables = self._collectAsArrow()
if tables:
table = pyarrow.concat_tables(tables)
- return table.to_pandas()
+ df = table.to_pandas()
+ return _check_dataframe_localize_timestamps(df)
--- End diff --
ditto (`df` ->`pdf`).
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]