I have a data set like this:
index sentence
1 bobby went to the gym
1 sally the bad
1 days are good
2 sunny side up
2 the weird
I want to count how many times 'the' appears in the columns 'sentence' by index:
index count_the
1 2
2 1
how would I do this in pandas?