how to create frequency table in python

Solutions on MaxInterview for how to create frequency table in python by the best coders in the world

showing results for - "how to create frequency table in python"
Daniel
12 Jan 2019
1table = {}
2total = 0 
3    
4for row in dataset:
5	total += 1
6	value = row[index]
7	if values in table: 
8		table[value] += 1
9	else: 
10		table[value] = 1