title: Trying to recode a column based on whether or not it contains a certain string
body: <p>I am trying to generalize on groups and I have a column of string titles in a dataframe. I want to split them based on whether or not they contain a string. There are many groups but they all either contain the string <code>"Alpha"</code> <code>"Beta"</code> or <code>"Gamma"</code>. I would like to recode a new column with those titles. The function below doesn't seem to work in the way I intended and I am not sure whether a regex or <code>np.where</code> approach would be better. Any help is greatly appreciated.</p>
  
  <pre><code>def recode_func(n):
      for i in n:
          if "Alpha" in i:
              i == "Alpha"
          elif "Beta" in i:
              i== "Beta"
          elif "Gamma" in i:
              i == "Gamma"
          else:
              continue
  </code></pre>