@@ -1494,14 +1494,16 @@ def sample(
14941494 )
14951495
14961496 def over (
1497- self : Self , * keys : str | Iterable [str ], _order_by : str | None = None
1497+ self : Self ,
1498+ * partition_by : str | Iterable [str ],
1499+ _order_by : str | None = None ,
14981500 ) -> Self :
14991501 """Compute expressions over the given groups.
15001502
15011503 Arguments:
1502- keys : Names of columns to compute window expression over.
1503- Must be names of columns, as opposed to expressions -
1504- so, this is a bit less flexible than Polars' `Expr.over`.
1504+ partition_by : Names of columns to compute window expression over.
1505+ Must be names of columns, as opposed to expressions -
1506+ so, this is a bit less flexible than Polars' `Expr.over`.
15051507 _order_by: Unused, but this is building up to something.
15061508
15071509 Returns:
@@ -1543,10 +1545,10 @@ def over(
15431545 if _order_by is not None and self ._metadata .kind .is_window ():
15441546 n_open_windows -= 1
15451547 metadata = ExprMetadata (kind , n_open_windows = n_open_windows )
1546- flattened = flatten (keys )
1548+ flat_partition_by = flatten (partition_by )
15471549 return self .__class__ (
15481550 lambda plx : self ._to_compliant_expr (plx ).over (
1549- flattened , kind = self ._metadata .kind
1551+ flat_partition_by , kind = self ._metadata .kind
15501552 ),
15511553 metadata ,
15521554 )
0 commit comments