Python Forum

Full Version: Rank word frequent in a list
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm a non-coder type, so sorry if I don't have a clue on how to do this. I have Column in an excel spreadsheet with hospital names. I want to basically count the number of time the same word or word phrase appears in the list. So for this short lists (which it is not) of
"Dallas Medical Center"
Hospital of Dallas"
"Presbyterian Medical Hospital"

I would like a like for the code to give "Medical", "Hospital" and "Dallas" a rank of 2; "Center", and "Presbyterian" a rank of 1 Thanks so much.
You can do it without having to write a line of python: https://kb.nmsu.edu/page.php?id=75271

should you want a python script, simply save the sheet as a csv file, read it into python, count the words.
should take an hour or so to learn enough python to do this.
If you try this, we will be glad to help, but we don't typically write code, if you really don't want to write code, and stll want a python script, ask for post to be moved to jobs, and offer compensation.