Pandas: Series - cov() function

Compute covariance with Pandas Series

The cov() function is used to compute covariance with Series, excluding missing values.


Series.cov(self, other, min_periods=None)
Pandas Series: cov() function


Name Description Type/Default Value Required / Optional
other Series with which to compute the covariance. Series Required
min_periods Minimum number of observations needed to have a valid result. int optional

Returns: float
Covariance between Series and other normalized by N-1 (unbiased estimator).


Download the Pandas Series Notebooks from here.

Previous: Count null observations in Pandas series
Next: Cumulative maximum over a Pandas DataFrame or Series axis