pandas.Series.cov

pandas 3.1.1 · Series and accessors · method

Estimate how pairs of numeric inputs vary together from aligned observations.

Call syntax

Series.cov(other, min_periods=None, ddof=1)

Run the example

Edit the example and select Run Python to see the result.

Parameters

ParameterRequirementAccepted values and behavior
other Required
Positional or keyword
Series

Supply the second object or value used in the operation.

min_periods Optional
Positional or keyword
Default None
int

Require this many valid observations in a window before pandas reports a value.

ddof Optional
Positional or keyword
Default 1
int

Set the degrees of freedom correction. The usual variance divisor is N minus ddof.

Returns

float