I have Data frame in which I want to count occurrence of some word per each column. Per one coumn I can do:
df['Col1'].str.contains('test').value_couns()
or
df[df['Col1'].str.contains('test')]['Col1'].count()
and i get count for particular column.
How can I get it for all columns? I would like to avoid do it manually per each column since there are quite a few of them.
Expected output