Answers for "pandas get column different values"

1

pandas unique values to list

df.groupby('param')['column'].nunique().sort_values(ascending=False).unique().tolist()
Posted by: Guest on May-15-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 "pandas get column different values"

Python Answers by Framework

Browse Popular Code Answers by Language