title: Get weighted value of pandas string series
body: <p>The Series is as below:</p>
  
  <pre><code>value
  aa aa bb cc
  dd ee aa
  ff aa cc
  </code></pre>
  
  <p>I want to count the occurrence of a word in the row and multiply it with weight given in the dictionary</p>
  
  <pre><code>weights = {
     'aa':1,
     'bb':1,
     'cc':0.5
  }
  </code></pre>
  
  <p>The resultant should be</p>
  
  <pre><code>value_score
  3.5
  1
  1.5
  </code></pre>
  
  <p>Above could be explained as sum(occurrence of word in dictionary * weight from dictionary) i.e for first value it is 2*1 + 1*1 + 1*0.5 = 3.5</p>
  
  <p>I have currently implemented using str.count, but as more values come in, it is not efficent</p>
  
  <pre><code>df['value_score'] = (df['value'].str.count('aa', regex=False) * weights['aa'] +
                       df['value'].str.count('bb', regex=False) * weights['bb'] +
                       df['value'].str.count('cc', regex=False) * weights['cc'] )
  </code></pre>