pub fn compute_correlation_pair(
df: &DataFrame,
col1_name: &str,
col2_name: &str,
) -> Result<CorrelationPair>Expand description
Computes correlation statistics for a pair of columns.
Returns Pearson correlation coefficient, p-value, covariance, and sample size, over the rows where both columns hold a finite value. Requires at least 3 such rows. Two passes over the columns as they are, a rough mean first and then the sums about it, as the matrix’s: no list of the pairs is built.