compute mean of each distinct value in dataframe code example Example: how to get distinct value in a column dataframe in python df.column.unique()