Python Programming Tutorial - 54 - Finding Most Frequent Items

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

The lack of support for such good videos disgusts me. You need to publicise these more.

huzaifahfarooq
Автор

Please consider my most sincere regards to your work. Your videos made me gain a tremendous amount of time in the learning process of Python.

yves-michelleporcher
Автор

It's funny how many people go until the end of the playlist.

KanagawaMarcos
Автор

This is a better implementation to the one in Video 37, thanks !

eyalpery
Автор

This is actually useful for language learning, I know im stating the obvious...

Ivilness
Автор

text = '''Quem me dera ao menos uma vez, ter de volta todo ouro que entreguei a quem
conseguiu me convencer que era prova de amizade se alguém levasse embora até o que eu não tinha.'''
print(len(text))

words = text.split()

for x in words:
print("Word: %s len: %d" %(x, len(x)))

counter = Counter(words)
top_three = counter.most_common(5)

print("Top three: ", top_three)
print(words)
print(len(words))

# portuguese

RobsonCartes
Автор

Could someone clarify why "we" which also occurred thrice was not printed along with "in", was it also sorted based on alphabetical preference? Sorry if this was silly am just a beginner

aishwarya.lnarasimhan
Автор

Nice vid. Could You show/write, how to remove commas after elements?

jevgenidruzkov
Автор

how would you go about without using libraries or functions?

Vicseverin
Автор

from collections import Counter

text = 'Set during the Third War for Armageddon, Helsreach follows Grimaldus, the newly promoted Reclusiarch of the Black Templars.' \
'Leading a group of Black Templars, and supported by the 101st Armageddon Steel Legion and titans of Legio Invigilata, ' \
'he is tasked with the defense of Hive Helsreach from the Ork invasion. Other characters and sub-plots include a Black Templar ' \
'Techmarine attempting to gain access to and activate Ordinatus Armageddon for use in defense of the hive, an Armageddon Steel Legion stormtrooper, ' \
'the command crew and priest of the Imperator Titan Stormherald, and Astra Militarum staff officers overseeing Helsreach\'s defence.'

words = text.split()

counter = Counter(words)
top_three = counter.most_common(3)
print(top_three)


[('the', 9), ('of', 6), ('and', 6)]

cmxcvi.v
Автор

How do I go about finding the most common phrases in a list?

bontlemabena
Автор

So I am about to finish these videos...can anyone suggest how to pick up my learning from after here? That would be soo helpful..thanks.

spandana
Автор

I have been using python for 1 month but I didn't know Counter()..

looploop
Автор

Does anyone know how to do this but for text within a .csv file?

Oneplusfonti