zhengruifeng commented on PR #37564:
URL: https://github.com/apache/spark/pull/37564#issuecomment-1221514409
one example:
```python
In [1]:
...: from pyspark.sql.types import *
...: from pyspark.sql import Column, DataFrame as SparkDataFrame,
functions as F
...:
...: data = np.random.randn(5, 2)
...:
...: index = ps.Index([1, 3, 5, 7, 9])
...:
...: pdf = pd.DataFrame(data, columns=["A", "B"])
...:
...: ps.set_option("compute.ops_on_diff_frames", True)
...:
...: psdf = ps.DataFrame(data=pdf, index=index)
...:
In [2]: psdf
A B
NaN 1.283948 1.014323
1.0 -0.093965 -0.752795
NaN -1.254084 1.586583
3.0 1.133467 -0.773754
NaN -2.089362 2.568566
5.0 NaN NaN
7.0 NaN NaN
9.0 NaN NaN
```
--
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]