staircase.core.arrays.accessor.StairsAccessor.cov#
- StairsAccessor.cov(where=(<staircase.constants.NegInf object>, <staircase.constants.Inf object>)) pandas.core.frame.DataFrame #
Calculates the covariance matrix for a collection of
Stairs
instances- Parameters
- lowerint, float or pandas.Timestamp
lower bound of the interval on which to perform the calculation
- upperint, float or pandas.Timestamp
upper bound of the interval on which to perform the calculation
- Returns
pandas.DataFrame
The covariance matrix
See also
Examples
>>> import staircase as sc >>> stairs = pd.Series([s1, s2, s1+s2], dtype="Stairs")
>>> stairs.sc.cov() 0 1 2 0 0.687500 0.140496 0.652893 1 0.140496 0.471074 0.611570 2 0.652893 0.611570 1.264463