-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Is your feature request related to a problem? Please describe.
I have a need to count the distinct values within a group, similar to the nunique method in Pandas GroupBy.
Describe the solution you'd like
I would like to have a method within the GroupBy class that counts the distinct non-null values per group. Even better, a CountIf method that allows the user to supply their own predicate to conditionally count rows per group.
Describe alternatives you've considered
I wrote my own CountDistinct method within my application, but it would be better if I could use a built in method.
Additional context
For reference, the Pandas method that I would like to loosely base this off of is here https://pandas.pydata.org/pandas-docs/version/2.2.2/reference/api/pandas.core.groupby.DataFrameGroupBy.nunique.html,