python get unique values in one column per value of the second column value code example Example: dataframe unique values in each column for col in df: print(df[col].unique())