Horje
python count the frequency of words in a list Code Example
python count the frequency of words in a list
from collections import Counter
list1=['apple','egg','apple','banana','egg','apple']
counts = Counter(list1)

print(counts)
# Counter({'apple': 3, 'egg': 2, 'banana': 1})




Python

Related
python get user home directory Code Example python get user home directory Code Example
traceback python Code Example traceback python Code Example
df dropna ensure that one column is not nan Code Example df dropna ensure that one column is not nan Code Example
dropdown in tkinter Code Example dropdown in tkinter Code Example
slice dataframe dwpwnding on column value not emty Code Example slice dataframe dwpwnding on column value not emty Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7