Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to count unique values in dataframe df python

#count unique values in each column
df.nunique()

#count unique values in each row
df.nunique(axis=1)
Source by www.statology.org #
 
PREVIOUS NEXT
Tagged: #count #unique #values #dataframe #df #python
ADD COMMENT
Topic
Name
7+6 =