1words = 'one two three'.split()
2
3df.assign(counts=df.texts.str.count('|'.join(words)))
4
5 texts counts
60 throne one 2
71 bar one 1
82 foo two 1
93 bar three 1
104 foo two 1
115 bar two 1
126 foo one 1
137 foo three 1
148 one three 2
15