You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "itholic (via GitHub)" <gi...@apache.org> on 2023/02/06 03:04:15 UTC

[GitHub] [spark] itholic commented on a diff in pull request #39790: [SPARK-42094][PS] Support `fill_value` for `ps.Series.(add|radd)`

itholic commented on code in PR #39790:
URL: https://github.com/apache/spark/pull/39790#discussion_r1096905034


##########
python/pyspark/pandas/series.py:
##########
@@ -507,7 +517,16 @@ def add(self, other: Any) -> "Series":
         series_examples=_add_example_SERIES,
     )
 
-    def radd(self, other: Any) -> "Series":
+    def radd(self, other: Any, fill_value: Union[int, str, float] = None) -> "Series":
+        if fill_value is not None:
+            if isinstance(other, (int, str, float)):
+                new_sdf = self._internal.resolved_copy.spark_frame.fillna(fill_value)

Review Comment:
   Updated!



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org