I currently created a Pandas Dataframe from a dictionary. The Dataframe looks something like:
URL TITLE
0 /xxxx.xx Hi this is word count
1 /xxxx.xx Hi this is Stack Overflow
2 /xxxx.xx Stack Overflow Questions
I want to add a new column to this table, which lists the number of frequency the word "Stack Overflow" appears. So for example, it would be like:
URL TITLE COUNT
0 /xxxx.xx Hi this is word count 0
1 /xxxx.xx Hi this is Stack Overflow 1
2 /xxxx.xx Stack Overflow Questions 1
The count function does not seem to work for dictionaries, but only for strings. Would there bean easy way to do this?