how to get unique values from a dataframe column based on condition code example Example: dataframe unique values in each column for col in df: print(df[col].unique())