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/04/11 19:54:55 UTC
[GitHub] [spark] xinrong-databricks commented on a diff in pull request #36104: [SPARK-38863][PYTHON] Implement `skipna` parameter of `DataFrame.all`
xinrong-databricks commented on code in PR #36104:
URL: https://github.com/apache/spark/pull/36104#discussion_r847684468
##########
python/pyspark/pandas/frame.py:
##########
@@ -10232,7 +10248,15 @@ def all(self, axis: Axis = 0, bool_only: Optional[bool] = None) -> "Series":
applied = []
for label in column_labels:
scol = self._internal.spark_column_for(label)
- all_col = F.min(F.coalesce(scol.cast("boolean"), SF.lit(True)))
+
+ if isinstance(self._internal.spark_type_for(label), NumericType) or skipna:
Review Comment:
Similar to [Series.all](https://github.com/apache/spark/blob/master/python/pyspark/pandas/base.py#L1041-L1048)
--
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