Answers for "count unique values per column in dataframe python"

4

dataframe unique values in each column

for col in df:
    print(df[col].unique())
Posted by: Guest on August-20-2020
4

how to count number of unique values in a column python

pd.value_counts(df.Account_Type)

Gold        3
Platinum    1
Name: Account_Type, dtype: int64
Posted by: Guest on June-04-2020

Code answers related to "count unique values per column in dataframe python"

Python Answers by Framework

Browse Popular Code Answers by Language