I have a dataframe as such:
A
0 Please wait outside of the house
1 A glittering gem is not enough.
2 The memory we used to share is no longer coher...
3 She only paints with bold colors; she does not...
I have a set of keywords:
keywords = ["of","is","she"]
How can I create a column for each keyword containing the number of occurrences of the keyword in each sentence of my dataframe? It would look something like:
A of is she
0 Please wait outside of the house 1 0 0
1 A glittering gem is not enough. 0 1 0
2 The memory we used to share is no longer coher... 0 1 0
3 She only paints with bold colors; she does not... 0 0 2
Note: I look at how to count specific words from a pandas Series?, but it does not answer my question.