I have a dataframe like this
Create dataframe:
pd.DataFrame(data={"a":["mac","mac","windows","mac",],"b": ["abc", "bcd", "bcd", "abc"]})
group it:
t.groupby('a').b.nunique()
output:
a mac 2 windows 1 Name: b, dtype: int64
2.1m questions
2.1m answers
60 comments
56.8k users