Yicong-Huang commented on code in PR #52897:
URL: https://github.com/apache/spark/pull/52897#discussion_r2516018905


##########
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))
+                    for col_data, field in zip(columns_data, 
self.schema.fields)

Review Comment:
   good point, although I think it is a list of list references so memory won't 
be too large of a difference. I changed it to iterator.



-- 
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]

Reply via email to