I have a pandas dataframe with a column/variable that consists entirely of text/strings.
I would like to create a new column that counts the number of times a keyword appears in the other column, for example:
keyword: 'the'
Column A: ['the dog', 'cat', 'the tree']
New Column: [1,0,1]
How do I do that?