I have a relatively simple question but I am novice in Python so I need help.
I want to iterate over a column in Python, where all values are sentences , like 'Friends+CCas+good result','just want everything to go smooth. serious','a mixture of both academic and non-academic', etc ...
Serie i want to loop | |
---|---|
First | 'Friends+CCas+good result' |
Second | 'just want everything to go smooth. serious' |
My goal is to add all the string in the column into a single one in order to count the total number of occurrences of each word separately for the entire column. I found this method for two string :
string = 'Hello '
string += 'World'
print(string) => 'Hello World' then I can string.split() but I tried list comprehension and loop without getting the good result I wanted for my entire column, in order to get something like this:
'Friends+CCas+good result just want everything to go smooth. serious a mixture of both academic and non-academic' with a space between all strings and then split the entire thing in order to get the total frequencies of each word
I hope I am clear enough.
Thank you in advance