-
Notifications
You must be signed in to change notification settings - Fork 185
[Enh]: Allow LazyFrame.with_row_index(..., order_by=...) #2307
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or requesthigh priorityYour PR will be reviewed very quickly if you address thisYour PR will be reviewed very quickly if you address thisroad to v2What takes us closer to `stable.v2` (high prio)What takes us closer to `stable.v2` (high prio)
Description
Description
Proposing to allow the following: LazyFrame.with_row_index(name, order_by=into_exprs)
This would be a deviation from polars itself.
In a way this is similar to #2174
Suggested implementation
I am missing some detail for sure, but it would be something close to:
self.with_column(**{name: nw.lit(1).cum_sum().over(order_by=order_by) - 1})Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthigh priorityYour PR will be reviewed very quickly if you address thisYour PR will be reviewed very quickly if you address thisroad to v2What takes us closer to `stable.v2` (high prio)What takes us closer to `stable.v2` (high prio)