DataFrame API: Support deferred GroupBy.__len__ and GroupBy.ngroups
Open
core
dataframe
improvement
P3
python
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 4.7k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 196
Description
We should be able to build a deferred operation that calculates the number of groups for GroupBy.ngroups.
len(groupby) might be possible ... but I think python will complain if we return something other than an integer (like a deferred operation). If thats the case we should raise an error that directs users to alternatives (e.g. ngroups).
Imported from Jira [BEAM-14107](https://issues.apache.org/jira/browse/BEAM-14107). Original Jira may contain additional context.
Reported by: yeandy.
Contributor guide
Assessment
This issue has not been assessed yet.