Answers for "pandas unique values in column count unique values"

8

count unique pandas

df['column'].nunique()
Posted by: Guest on March-12-2020
0

count unique values in python

words = ['a', 'b', 'c', 'a']
unique_words = set(words)             # == set(['a', 'b', 'c'])
unique_word_count = len(unique_words) # == 3
Posted by: Guest on September-28-2020

Code answers related to "pandas unique values in column count unique values"

Python Answers by Framework

Browse Popular Code Answers by Language