frequency of value in column pandas code example
Example 1: python plot frequency of column values
# Plot frequency
my_df['my_var'].value_counts().plot.bar()
# Add column freq to the DF
df['freq']=df.groupby(by='Name')['Name'].transform('count')
Example 2: number of times a value occurs in dataframne
df['a'].value_counts()