Skip to content

Commit 5322a5a

Browse files
NO-SNOW: Fix flaky regr_* doctests
1 parent 5899e71 commit 5322a5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/snowflake/snowpark/functions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11748,7 +11748,7 @@ def regr_avgy(y: ColumnOrName, x: ColumnOrName, _emit_ast: bool = True) -> Colum
1174811748

1174911749
Example::
1175011750

11751-
>>> df = session.create_dataframe([[10, 11], [20, 22], [25, None], [30, 35]], schema=["v", "v2"])
11751+
>>> df = session.create_dataframe([[10, 11], [20, 22], [25, None], [30, 35]], schema=["v", "v2"]).sort("v")
1175211752
>>> df = df.group_by("v").agg(regr_avgy(df["v"], df["v2"]).alias("regr_avgy"))
1175311753
>>> df.collect()
1175411754
[Row(V=10, REGR_AVGY=10.0), Row(V=20, REGR_AVGY=20.0), Row(V=25, REGR_AVGY=None), Row(V=30, REGR_AVGY=30.0)]
@@ -11837,7 +11837,7 @@ def regr_sxx(y: ColumnOrName, x: ColumnOrName, _emit_ast: bool = True) -> Column
1183711837

1183811838
Example::
1183911839

11840-
>>> df = session.create_dataframe([[10, 11], [20, 22], [25, None], [30, 35]], schema=["v", "v2"])
11840+
>>> df = session.create_dataframe([[10, 11], [20, 22], [25, None], [30, 35]], schema=["v", "v2"]).sort("v")
1184111841
>>> df.group_by("v").agg(regr_sxx(col("v"), col("v2")).alias("regr_sxx")).collect()
1184211842
[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)]
1184311843
"""

0 commit comments

Comments
 (0)