viirya commented on a change in pull request #27358: [SPARK-30640][PYTHON][SQL]
Prevent unnecessary copies of data during Arrow to Pandas conversion
URL: https://github.com/apache/spark/pull/27358#discussion_r371046394
##########
File path: python/pyspark/sql/pandas/conversion.py
##########
@@ -109,7 +109,11 @@ def toPandas(self):
# values, but we should use datetime.date to match the
behavior with when
# Arrow optimization is disabled.
pdf = table.to_pandas(date_as_object=True)
- return _check_dataframe_localize_timestamps(pdf,
timezone)
+ for field in self.schema:
+ if isinstance(field.dataType, TimestampType):
+ pdf[field.name] = \
Review comment:
ok. looks good then. thanks!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]