jzhan-2026 commented on code in PR #58254:
URL: https://github.com/apache/spark/pull/58254#discussion_r3875359169


##########
python/pyspark/pandas/frame.py:
##########
@@ -11756,12 +11756,13 @@ def _result_aggregated(
         # dtype: bool
         return first_series(DataFrame(internal))
 
-    # TODO(SPARK-46167): add pct, na_option parameter
     def rank(
         self,
         method: Literal["average", "min", "max", "first", "dense"] = "average",
         ascending: bool = True,
         numeric_only: bool = False,
+        na_option: Literal["keep", "top", "bottom"] = "keep",
+        pct: bool = False,

Review Comment:
   Thanks for your comments! I have moved the newly added args at the end to 
ensure backward compatibility.
   
   
   > Or do we shove them after **kwargs?
   
   I personally lean towards putting args at the end because using **kwargs 
diverges from all other recently-added params in this codebase (SPARK-46163, 
SPARK-47997, SPARK-53645 — none used *); also creates an asymmetry with pandas' 
own signature where these params aren't keyword-only. Happy to go a different 
direction if you have a preference though!



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