zhengruifeng commented on code in PR #37564:
URL: https://github.com/apache/spark/pull/37564#discussion_r948975259
##########
python/pyspark/pandas/frame.py:
##########
@@ -455,10 +456,14 @@ def __init__( # type: ignore[no-untyped-def]
from pyspark.pandas.indexes.base import Index
if isinstance(index, Index):
- raise TypeError(
- "The given index cannot be a pandas-on-Spark index. "
- "Try pandas index or array-like."
- )
+ if get_option("compute.ops_on_diff_frames"):
+ index = index.to_pandas()
Review Comment:
oh, I misunderstood the task.
in this case, the data should be converted to `SparkDataFrame` or
`InternalFrame ` and then joined with the ps.Index, right?
--
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]