pandas value_counts sort code example
Example 1: relativefrequencies of the unique values pandas
df.value_counts(normalize=True)
Example 2: dataframe value counts sort
mt = mobile.PattLen.value_counts().sort_index()
df.value_counts(normalize=True)
mt = mobile.PattLen.value_counts().sort_index()