nxcals.api.extraction.data.builders.DataFrame.corr

DataFrame.corr(col1: str, col2: str, method: Optional[str] = None) float

Calculates the correlation of two columns of a DataFrame as a double value. Currently only supports the Pearson Correlation Coefficient. DataFrame.corr() and DataFrameStatFunctions.corr() are aliases of each other.

New in version 1.4.0.

Parameters:
  • col1 (str) – The name of the first column

  • col2 (str) – The name of the second column

  • method (str, optional) – The correlation method. Currently only supports “pearson”