Использование настройки @Ram:
df = pd.DataFrame(columns=['data'], data=['what are you doing', 'give me the the file', 'the sun comes up up', 'you and me'])
word_list = ['the', 'up', 'me']
df['data'].str.split(expand=True).stack().groupby(level=0)\
.apply(lambda x: x.drop_duplicates().value_counts())\
.sum(level=1)[word_list]
Вывод:
the 2
up 1
me 2
dtype: int64
Или использование настройки @Alex:
data = np.array(['hello friend','this','is Anna coming?','hello there!'])
ser = pd.Series(data)
my_l = ['hello', 'is']
ser.str.split(expand=True).stack().groupby(level=0)\
.apply(lambda x: x.drop_duplicates().value_counts())\
.sum(level=1)[my_l]
Вывод:
hello 2
is 1
dtype: int64