Created
July 11, 2019 12:09
-
-
Save focaalvarez/dfd54673f6fbb74619884ad2dd9fd696 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#count words in names | |
pubs['word_count'] = pubs['name'].apply(lambda x: len(str(x).split(" "))) | |
pubs.hist(column=['word_count'],grid=False,bins=10) | |
print('The average lenght of the Pub names is ',str(pubs['word_count'].mean()),' words.') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment