out of all columns how to select column with more than 2 unique values in dataframe code example
Example 1: 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]))
Example 2: Returns a new DataFrame containing the distinct rows in this DataFrame
# Returns a new DataFrame containing the distinct rows in this DataFrame
df.ditinct().count()
# 2