Yikun commented on a change in pull request #34212:
URL: https://github.com/apache/spark/pull/34212#discussion_r782669292



##########
File path: python/pyspark/pandas/tests/test_series.py
##########
@@ -3020,6 +3020,67 @@ def test_eq(self):
         with self.assertRaisesRegex(ValueError, "Lengths must be equal"):
             psser == other
 
+    def test_combine(self):
+        pdf = pd.DataFrame(
+            {"s1": [330.0, 160.0, np.nan], "s2": [345.0, 0.0, 30.0], "s3": 
[345.0, 0.0, 30.0]}
+        )
+        psdf = ps.from_pandas(pdf)
+
+        self.assert_eq(
+            pdf["s1"].combine(pdf["s2"], max),
+            psdf["s1"].combine(psdf["s2"], max),
+        )
+        self.assert_eq(
+            pdf["s1"].combine(pdf["s2"], max, fill_value=100),

Review comment:
       Question: Does `fill_value` work in pandas actually? Looks like we need 
to find a real case to fill the value I guess.
   ```
   >>> pdf["s1"].combine(pdf["s2"], max, fill_value=100)
   0    345.0
   1    160.0
   2      NaN
   dtype: float64
   ```




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