spark
spark copied to clipboard
[SPARK-40510][PS] Implement `ddof` in `Series.cov`
What changes were proposed in this pull request?
Implement ddof
in Series.cov
, by switch to SF.covar
Why are the changes needed?
for API coverage
Does this PR introduce any user-facing change?
yes, ddof
supported now
>>> s1 = ps.Series([0.90010907, 0.13484424, 0.62036035])
>>> s2 = ps.Series([0.12528585, 0.26962463, 0.51111198])
>>> with ps.option_context("compute.ops_on_diff_frames", True):
... s1.cov(s2)
-0.016857...
>>> with ps.option_context("compute.ops_on_diff_frames", True):
... s1.cov(s2, ddof=2)
-0.033715...
How was this patch tested?
added UT