title: Pandas: Insert a new Column based on description of previous column
body: <p>I have a dataset of around 2800 records. I have a column called as 'Trigger-catogory' which is a Multi-class classification field with one of the attribute being 'CLI-Related'
  The dataset has a 'Headline' column and going through the headline i want to further classify it . I have written a code as below</p>
  <pre><code>for i in range(df.shape[0]):
      rowIndex = df.index[i]
      if df.loc[rowIndex].Trigger_Type == 'CLI-Related':
          cli_related_counter += 1
          headline = df.loc[rowIndex].Headline
          print(headline)
          if re.search('config|push', headline, re.I):
              cc_count+=1  
              df.loc[rowIndex]['Cli-Sub-Cat'] = 'Config'  &gt;&gt;&gt; Trying to insert a new column with a custom value
              continue
          
          if re.search('counter|stat', headline, re.I):
              counter_count+=1
              df.loc[rowIndex]['Cli-Sub-Cat'] = 'Counter'
              continue
              
          if re.search('debug', headline, re.I):
              debug_count+=1
              df.loc[rowIndex]['Cli-Sub-Cat'] = 'debug'
              continue
  </code></pre>
  <p>The output that i expect is:</p>
  <pre><code>    Idenfifier  Headline    Trigger_Type    Cli_Sub_Cat     Prog_Sub_cat
  0    1          AAA         CLI-Related       Config        NaN
  1    2          BBB         Prog-Related      NaN           Prog-1
  2    3          CCC         CLI-Related       Counter       NaN
  3    4          DDD         CLI-Related       Config        NaN
  4    5          EEE         Prog-Related      NaN           Prog-2
  5    6          FFF         Prog-Related      NaN           Prog-3
  6    7          GGG         CLI-Related       Debug         NaN
  7    8          HHH         Prog-Related      NaN           Prog-1
  </code></pre>
  <p>Initially i will be running</p>