Skip to content

Commit c8ac953

Browse files
Add note about different series lengths to Series.corr and Series.cov docs (#47145)
* add to corr docs * add to cov docs * fix typo
1 parent c9ce063 commit c8ac953

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pandas/core/series.py

+4
Original file line numberDiff line numberDiff line change
@@ -2541,6 +2541,8 @@ def quantile(self, q=0.5, interpolation="linear"):
25412541
def corr(self, other, method="pearson", min_periods=None) -> float:
25422542
"""
25432543
Compute correlation with `other` Series, excluding missing values.
2544+
The two `Series` objects are not required to be the same length and will be
2545+
aligned internally before the correlation function is applied.
25442546
25452547
Parameters
25462548
----------
@@ -2613,6 +2615,8 @@ def cov(
26132615
) -> float:
26142616
"""
26152617
Compute covariance with Series, excluding missing values.
2618+
The two `Series` objects are not required to be the same length and
2619+
will be aligned internally before the covariance is calculated.
26162620
26172621
Parameters
26182622
----------

0 commit comments

Comments
 (0)