snowflake.snowpark.functions.regr_sxx¶ snowflake.snowpark.functions.regr_sxx(y: Union[Column, str], x: Union[Column, str]) → Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.40.0/src/snowflake/snowpark/functions.py#L11674-L11687)¶ Returns REGR_COUNT(y, x) * VAR_POP(x) for non-null pairs. Example: CopyExpand>>> df = session.create_dataframe([[10, 11], [20, 22], [25, None], [30, 35]], schema=["v", "v2"]) >>> df.group_by("v").agg(regr_sxx(col("v"), col("v2")).alias("regr_sxx")).collect() [Row(V=10, REGR_SXX=0.0), Row(V=20, REGR_SXX=0.0), Row(V=25, REGR_SXX=None), Row(V=30, REGR_SXX=0.0)] Show lessSee moreScroll to top