Answers for "plot data frequency using matplotlib"

3

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')
Posted by: Guest on October-20-2020
0

how to create frequency table in python

table = {}
total = 0 
    
for row in dataset:
	total += 1
	value = row[index]
	if values in table: 
		table[value] += 1
	else: 
		table[value] = 1
Posted by: Guest on June-08-2021

Code answers related to "plot data frequency using matplotlib"

Python Answers by Framework

Browse Popular Code Answers by Language