Yicong-Huang commented on code in PR #52897:
URL: https://github.com/apache/spark/pull/52897#discussion_r2516022855
##########
python/pyspark/sql/pandas/conversion.py:
##########
@@ -208,13 +210,15 @@ def toPandas(self) -> "PandasDataFrameLike":
),
error_on_duplicated_field_names=False,
timestamp_utc_localized=False,
- )(pser)
- for (_, pser), field in zip(pdf.items(),
self.schema.fields)
+ )(pd.Series(col_data, dtype=object))
Review Comment:
I also tried to use field.dataType explicitly but it would need some
conversion to pandas data type, which is the purpose of
`_create_converter_to_pandas`. So I suggest we keep use `object` for disabling
type inference.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]