title: Replace string column endwiths specific substrings under condition of another column with Pandas
body: <p>Given a dataset as follows:</p>
  <pre><code>   id  company name  value
  0   1    Finl Corp.      7
  1   2  Fund Tr Corp      6
  2   3   Inc Invt Fd      5
  3   4  Govt Fd Inc.      3
  4   5   Trinity Inc      5
  </code></pre>
  <p>Or:</p>
  <pre><code>[{'id': 1, 'company name': 'Finl Corp.', 'value': 7},
   {'id': 2, 'company name': 'Fund Tr Corp', 'value': 6},
   {'id': 3, 'company name': 'Inc Invt Fd', 'value': 5},
   {'id': 4, 'company name': 'Govt Fd Inc.', 'value': 3},
   {'id': 5, 'company name': 'Trinity Inc', 'value': 5}]
  </code></pre>
  <p>I need to replace if <code>company name</code> column's contents endwiths <code>['Corp.', 'Corp', 'Inc.', 'Inc']</code>, while at same time <code>value</code> is <code>&gt;= 5</code></p>
  <p>The expected result will be:</p>
  <pre><code>   id  company name  value
  0   1          Finl      7
  1   2       Fund Tr      6
  2   3   Inc Invt Fd      5
  3   4  Govt Fd Inc.      3
  4   5       Trinity      5
  </code></pre>
  <p>How could I acheive that in Pandas and regex?</p>
  <p>Trial code with error: <code>TypeError: replace() missing 1 required positional argument: 'repl'</code></p>
  <pre><code>mask = (df1['value'] &gt;= 5)
  df1.loc[mask, 'company_name_concise']= df1.loc[mask, 'company name'].str.replace(r'\bCorp.|Corp|Inc.|Inc$', regex=True)
  </code></pre>