pandas.core.groupby.SeriesGroupBy.nunique

SeriesGroupBy.nunique(self, dropna: bool = True) → pandas.core.series.Series[source]

Return number of unique elements in the group.

Returns
Series

Number of unique values within each group.