Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas groupby agg count unique

df.groupby("A").agg({"B": lambda x: x.nunique()})
 
PREVIOUS NEXT
Tagged: #pandas #groupby #agg #count #unique
ADD COMMENT
Topic
Name
7+7 =