diff --git a/src/snowflake/snowpark/modin/plugin/docstrings/dataframe.py b/src/snowflake/snowpark/modin/plugin/docstrings/dataframe.py index 2aef74e0f0..d8fabee7e5 100644 --- a/src/snowflake/snowpark/modin/plugin/docstrings/dataframe.py +++ b/src/snowflake/snowpark/modin/plugin/docstrings/dataframe.py @@ -713,6 +713,7 @@ def aggregate(): agg = aggregate def apply(): + # TODO SNOW-1739034 unskip UDF tests when pandas 2.2.3 is available in anaconda """ Apply a function along an axis of the DataFrame. @@ -821,7 +822,7 @@ def apply(): Using a reducing function on ``axis=1``: - >>> df.apply(np.sum, axis=1) + >>> df.apply(np.sum, axis=1) # doctest: +SKIP 0 2 1 10 2 13 @@ -829,7 +830,7 @@ def apply(): Returning a list-like object will result in a Series: - >>> df.apply(lambda x: [1, 2], axis=1) + >>> df.apply(lambda x: [1, 2], axis=1) # doctest: +SKIP 0 [1, 2] 1 [1, 2] 2 [1, 2] @@ -1022,6 +1023,7 @@ def keys(): """ def transform(): + # TODO SNOW-1739034 unskip UDF tests when pandas 2.2.3 is available in anaconda """ Call ``func`` on self producing a Snowpark pandas DataFrame with the same axis shape as self. @@ -1055,7 +1057,7 @@ def transform(): 0 1 3 1 2 4 2 3 5 - >>> df.transform(lambda x: x + 1, axis=1) + >>> df.transform(lambda x: x + 1, axis=1) # doctest: +SKIP col1 col2 0 2 4 1 3 5 @@ -1063,7 +1065,7 @@ def transform(): Apply a numpy ufunc to every value in the DataFrame. - >>> df.transform(np.square, axis=1) + >>> df.transform(np.square, axis=1) # doctest: +SKIP col1 col2 0 1 9 1 4 16 diff --git a/src/snowflake/snowpark/modin/plugin/docstrings/groupby.py b/src/snowflake/snowpark/modin/plugin/docstrings/groupby.py index f9260ddb0a..0dbdced47c 100644 --- a/src/snowflake/snowpark/modin/plugin/docstrings/groupby.py +++ b/src/snowflake/snowpark/modin/plugin/docstrings/groupby.py @@ -989,6 +989,7 @@ def cummax(): """ def apply(): + # TODO SNOW-1739034 unskip UDF tests when pandas 2.2.3 is available in anaconda """ Apply function ``func`` group-wise and combine the results together. @@ -1050,7 +1051,7 @@ def apply(): its argument and returns a DataFrame. `apply` combines the result for each group together into a new DataFrame: - >>> g1[['B', 'C']].apply(lambda x: x.select_dtypes('number') / x.select_dtypes('number').sum()) # doctest: +NORMALIZE_WHITESPACE + >>> g1[['B', 'C']].apply(lambda x: x.select_dtypes('number') / x.select_dtypes('number').sum()) # doctest: +SKIP B C 0.0 0.333333 0.4 1.0 0.666667 0.6 @@ -1059,7 +1060,7 @@ def apply(): In the above, the groups are not part of the index. We can have them included by using ``g2`` where ``group_keys=True``: - >>> g2[['B', 'C']].apply(lambda x: x.select_dtypes('number') / x.select_dtypes('number').sum()) # doctest: +NORMALIZE_WHITESPACE + >>> g2[['B', 'C']].apply(lambda x: x.select_dtypes('number') / x.select_dtypes('number').sum()) # doctest: +SKIP B C A a 0.0 0.333333 0.4 @@ -1942,6 +1943,7 @@ def cov(): pass def transform(): + # TODO SNOW-1739034 unskip UDF tests when pandas 2.2.3 is available in anaconda """ Call function producing a same-indexed DataFrame on each group. @@ -2011,7 +2013,7 @@ def transform(): i X 9 90 -9 j Y 10 10 -10 - >>> df.groupby("col1", dropna=True).transform(lambda df, n: df.head(n), n=2) + >>> df.groupby("col1", dropna=True).transform(lambda df, n: df.head(n), n=2) # doctest: +SKIP col2 col3 col4 a 1.0 40.0 -1.0 b NaN NaN NaN @@ -2024,7 +2026,7 @@ def transform(): i NaN NaN NaN j 10.0 10.0 -10.0 - >>> df.groupby("col1", dropna=False).transform("mean") + >>> df.groupby("col1", dropna=False).transform("mean") # doctest: +SKIP col2 col3 col4 a 2.50 25.0 -2.50 b 5.00 65.0 -5.00