Answers for "unique list of items from data frame python"

9

how to get distinct value in a column dataframe in python

df.column.unique()
Posted by: Guest on May-30-2020
0

if df[col].unique()==2

df_dict = dict(zip([i for i in df.columns] , [pd.DataFrame(df[i].unique(), columns=[i]) for i in df.columns]))
Posted by: Guest on October-15-2020

Code answers related to "unique list of items from data frame python"

Python Answers by Framework

Browse Popular Code Answers by Language