-
Notifications
You must be signed in to change notification settings - Fork 176
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Currently, we don't allow
nw.col('price').cum_sum()in the lazy case, requiring instead
nw.col('price').cum_sum().over(order_by='date')We could also allow
nw.col('price').cum_sum(order_by='date')with the following restriction:
- it's not allowed to do
nw.col('price').cum_sum(order_by='date').over('asset', order_by='date'). specifyorder_byin eitheroverorcum_sumbut not both
What this enables:
- we can add
order_bytofirst, so then we you can dodf.group_by('a').agg(nw.col('b').first(order_by='c')) - i think it's conceptually easier to teach
nw.col('price').cum_sum(order_by='date')than it is to teachnw.col('price').cum_sum().over(order_by='date')
I'm just trying this out, but i think the impact on complexity is relatively small
Issues:
- slight divergence from Polars API, but I'm ok with it, i think it still feels in the polars spirit
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request