Skip to content

SNOW-1844466: Support more aggregation functions in pivot methods.#2915

Merged
sfc-gh-mvashishtha merged 6 commits intomainfrom
mvashishtha/SNOW-1890740/support-more-aggregation-functions-in-pivot-methods
Jan 28, 2025
Merged

SNOW-1844466: Support more aggregation functions in pivot methods.#2915
sfc-gh-mvashishtha merged 6 commits intomainfrom
mvashishtha/SNOW-1890740/support-more-aggregation-functions-in-pivot-methods

Conversation

@sfc-gh-mvashishtha
Copy link
Contributor

@sfc-gh-mvashishtha sfc-gh-mvashishtha commented Jan 23, 2025

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>
Signed-off-by: sfc-gh-mvashishtha <mahesh.vashishtha@snowflake.com>
Signed-off-by: sfc-gh-mvashishtha <mahesh.vashishtha@snowflake.com>
@sfc-gh-mvashishtha sfc-gh-mvashishtha marked this pull request as ready for review January 27, 2025 21:59
@sfc-gh-mvashishtha sfc-gh-mvashishtha requested a review from a team as a code owner January 27, 2025 21:59
@sfc-gh-mvashishtha sfc-gh-mvashishtha enabled auto-merge (squash) January 27, 2025 22:22
Copy link
Contributor

@sfc-gh-helmeleegy sfc-gh-helmeleegy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, just a few nits. Thanks, Mahesh!

sfc-gh-mvashishtha and others added 2 commits January 28, 2025 11:28
Co-authored-by: Hazem Elmeleegy <hazem.elmeleegy@snowflake.com>
Co-authored-by: Hazem Elmeleegy <hazem.elmeleegy@snowflake.com>
@sfc-gh-mvashishtha sfc-gh-mvashishtha merged commit f61e698 into main Jan 28, 2025
37 checks passed
@sfc-gh-mvashishtha sfc-gh-mvashishtha deleted the mvashishtha/SNOW-1890740/support-more-aggregation-functions-in-pivot-methods branch January 28, 2025 20:30
@github-actions github-actions bot locked and limited conversation to collaborators Jan 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants