You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SNOW-1844466: Support more aggregation functions in pivot methods. (#2915)
Add support for aggregations ``"count"``, ``"median"``, ``np.median``,
``"skew"``, ``"std"``, ``np.std`` ``"var"``, and ``np.var`` in
``pd.pivot_table()``, ``DataFrame.pivot_table()``, and
``pd.crosstab()``.
Snowflake PIVOT now supports all those aggregations.
This commit also expands pivot and crosstab tests to include some
aggregation functions we do not yet support due to Snowflake's PIVOT
limitations.
Fixes SNOW-1844466
---------
Signed-off-by: sfc-gh-mvashishtha <mahesh.vashishtha@snowflake.com>
# TODO: (SNOW-853334) Add support for any non-supported snowflake pivot aggregations
529
526
raiseErrorMessage.not_implemented(
530
527
f"Snowpark pandas DataFrame.pivot_table does not yet support the aggregation {repr_aggregate_function(original_aggfunc, agg_kwargs={})} with the given arguments."
Copy file name to clipboardExpand all lines: src/snowflake/snowpark/modin/plugin/compiler/snowflake_query_compiler.py
-6Lines changed: 0 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -9094,12 +9094,6 @@ def pivot_table(
9094
9094
if not sort:
9095
9095
raise NotImplementedError("Not implemented not sorted")
9096
9096
9097
-
# TODO: (SNOW-853334) Support callable agg functions
9098
-
if aggfunc and callable(aggfunc):
9099
-
raise NotImplementedError(
9100
-
f"Snowpark pandas DataFrame.pivot_table does not yet support the aggregation {repr_aggregate_function(aggfunc, agg_kwargs={})} with the given arguments."
9101
-
)
9102
-
9103
9097
if columns is not None and isinstance(columns, Hashable):
0 commit comments