Skip to content

Commit b2132c6

Browse files
authored
Fix aggregate_function in pivot calls
Reversal of `values and `aggregate_function` parameters
1 parent a0e3282 commit b2132c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

narwhals-python/universal_processing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ def universal_pivot_v1(df: IntoFrameT) -> IntoFrameT:
3737
.pivot(
3838
on="party_name",
3939
index="century",
40-
aggregate_function="count",
4140
values="last_name",
41+
aggregate_function="count"
4242
)
4343
.to_native()
4444
)
@@ -52,8 +52,8 @@ def universal_pivot_v2(df: IntoFrameT) -> IntoFrameT:
5252
.pivot(
5353
on="party_name",
5454
index="century",
55-
aggregate_function="count",
5655
values="last_name",
56+
aggregate_function="count"
5757
)
5858
.to_native()
5959
)

0 commit comments

Comments
 (0)