def cov( a: Union[str, "pl.Expr"], b: Union[str, "pl.Expr"], ) -> "pl.Expr": """ Compute the covariance between two columns/ expressions. 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(pycov(a._pyexpr, b._pyexpr))
def cov( a: str | pli.Expr, b: str | pli.Expr, ) -> pli.Expr: """ Compute the covariance between two columns/ expressions. 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(pycov(a._pyexpr, b._pyexpr))