You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/07/29 09:33:14 UTC
[GitHub] [spark] zhengruifeng commented on a diff in pull request #37328: [SPARK-39907][PS] Implement axis and skipna of Series.argmin
zhengruifeng commented on code in PR #37328:
URL: https://github.com/apache/spark/pull/37328#discussion_r933053746
##########
python/pyspark/pandas/series.py:
##########
@@ -6322,13 +6322,21 @@ def argmax(self, axis: Axis = None, skipna: bool = True) -> int:
# If the maximum is achieved in multiple locations, the first row position is returned.
return -1 if max_value[0] is None else max_value[1]
- def argmin(self) -> int:
+ def argmin(self, axis: Axis = None, skipna: bool = True) -> int:
"""
Return int position of the smallest value in the Series.
If the minimum is achieved in multiple locations,
the first row position is returned.
+ Parameters
+ ----------
+ axis : {{None}}
+ Dummy argument for consistency with Series.
+ skipna : bool, default True
+ Exclude NA/null values. If the entire Series is NA, the result
Review Comment:
it results -1, not NA.
this behavior is the same as Pandas.
good catch!
--
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