-
Notifications
You must be signed in to change notification settings - Fork 429
Closed
Labels
enhancementNew feature or requestNew feature or requestnarwhalsFeatures/Bugs related to supporting narwhalsFeatures/Bugs related to supporting narwhalsp2 (backlog)Nice to have featuresNice to have features
Description
Is your feature request related to a problem?
Related to #3985, but I'm looking for a daft.len() expression to use in group-by
Describe the solution you'd like
import daft
df = daft.from_pydict({'a': [1,1,2], 'b': [4,5,6], 'c': [7,8,9]})
df.groupby('a').agg(daft.col('b').sum(), daft.count('all').alias('count'))Describe alternatives you've considered
Some previous discussion at #3985 , but there I was pointed to Expression.count. That works, but outside the group-by context when a column names is passed, e.g.
In [40]: df.agg(daft.col('a').count('all')).collect()
Out[40]:
╭────────╮
│ a │
│ --- │
│ UInt64 │
╞════════╡
│ 3 │
╰────────╯Additional Context
This is for Daft support in Narwhals
Would you like to implement a fix?
No
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestnarwhalsFeatures/Bugs related to supporting narwhalsFeatures/Bugs related to supporting narwhalsp2 (backlog)Nice to have featuresNice to have features