title: How to match key words in a pandas series
body: <p>I want to iterate over all the rows in one of my Dataframe columns named <strong>Subject</strong> and look for multiple key words from the dictionary named <strong>keywords</strong>. If a key from the dictionary matches a word in the Dataframe column, I want to add the dictionary value pair for the matched key to a new column in the Dataframe named <strong>Category</strong>. My code below was my first idea to add values to a list and then add the list as a new column to my Dataframe but obviously the indexes will not match up. Is there a way to append the keyword value directly to the Dataframe whenever a key matches in the subject column?</p>
  
  <p>'''</p>
  
  <pre><code>tickets = pd.read_csv('All VS Tickets with Category.csv',parse_dates=['Creation Date'])
  tickets = tickets.fillna('')
  
  keywords = {'BOR':'Broker of Record','New Vendor':'New Vendor Build'}
  Category_column = []
  
  def indexmatch(subject):
      for key, value in keywords.items():
          if key in subject:
              print('Match')
              Category_column.append(values)
          else:
              print('No Match')
              Category_column.append('')
  
  
  tickets['Subject'].apply(indexmatch)
  Category_column = pd.Series(Category_column)
  tickets.insert(0,column='Category',value=Category_column)
  </code></pre>
  
  <p>'''</p>
  
  <p><a href="https://i.stack.imgur.com/BExTA.png" rel="nofollow noreferrer">Image of example code</a></p>