I have a data frame with words in each row. An example of some lines:
df
This is a word
Another word
third word
word
And I want to count the number of each row and write it to a new data frame and have something like this in the last csv:
df,total
This is a word,4
Another word,2
third word,2
word,1
Is it possible to use a space character?
source
share