Answers for "dataframe group by count unique"

3

pandas groupby column count distinct values

# Pandas group by a column looking at the count unique/count distinct values of another column

df.groupby('param')['group'].nunique()
Posted by: Guest on May-15-2020
1

values of unique from dataframe with count

data = df.groupby('ColumnName')['IDColumnName'].nunique()
print(data)
Posted by: Guest on November-07-2020

Code answers related to "dataframe group by count unique"

Python Answers by Framework

Browse Popular Code Answers by Language