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/09/21 02:20:55 UTC
[GitHub] [spark] zhengruifeng commented on a diff in pull request #37929: [SPARK-40486][PS] Implement `spearman` and `kendall` in `DataFrame.corrwith`
zhengruifeng commented on code in PR #37929:
URL: https://github.com/apache/spark/pull/37929#discussion_r975974274
##########
python/pyspark/pandas/frame.py:
##########
@@ -1847,14 +1665,14 @@ def corrwith(
----------
other : DataFrame, Series
Object with which to compute correlations.
-
+ axis : int, default 0 or 'index'
+ Can only be set to 0 at the moment.
drop : bool, default False
Drop missing indices from result.
-
- method : str, default 'pearson'
- Method of correlation, one of:
-
+ method : {'pearson', 'spearman', 'kendall'}
Review Comment:
good question, I think it's a bit hard to support this `callable`:
it takes two arrays, so should collect all values in the columns, but it's not scalable then
maybe, we can support another `callable`: `Callable[[Column, Column], float]`, which is an aggregation function, this may make sense. I think we need more discussion/thoughs on it.
--
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