def pearson_corr( a: Union[str, "pl.Expr"], b: Union[str, "pl.Expr"], ) -> "pl.Expr": """ Compute the pearson's correlation between two columns. Parameters ---------- a Column name or Expression. b Column name or Expression. """ if isinstance(a, str): a = col(a) if isinstance(b, str): b = col(b) return pl.lazy.expr.wrap_expr(pypearson_corr(a._pyexpr, b._pyexpr))
def pearson_corr( a: str | pli.Expr, b: str | pli.Expr, ) -> pli.Expr: """ Compute the pearson's correlation between two columns. Parameters ---------- a Column name or Expression. b Column name or Expression. """ if isinstance(a, str): a = col(a) if isinstance(b, str): b = col(b) return pli.wrap_expr(pypearson_corr(a._pyexpr, b._pyexpr))