get unique values of each column pandas code example
Example 1: dataframe unique values in each column
for col in df:
print(df[col].unique())
Example 2: 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]))