staircase.core.arrays.accessor.StairsAccessor.corr#
- StairsAccessor.corr(where=(<staircase.constants.NegInf object>, <staircase.constants.Inf object>))#
Calculates the correlation 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 correlation matrix
See also
Examples
>>> import staircase as sc >>> stairs = pd.Series([s1, s2, s1+s2], dtype="Stairs") >>> stairs.sc.corr() 0 1 2 0 1.000000 0.246878 0.700249 1 0.246878 1.000000 0.792407 2 0.700249 0.792407 1.000000