title: how to replace the first 2 digits of the column value where value is between 2019 to 2099
body: <p>I have a Python dataframe with about 2,500 rows and 6 columns. With one specific column I would like to replace the first 2 characters of each row in an conditional statement.</p>
  
  <p>In:</p>
  
  <pre><code>S.No  year
  1     2019
  2     2020
  3     2021
  4     2005
  5     2056
  </code></pre>
  
  <p>Out:</p>
  
  <pre><code>S.No  year
  1     1919
  2     1920
  3     1921
  4     2005
  5     1956
  </code></pre>
  
  <p><strong>Code :</strong></p>
  
  <pre><code>import pandas ad pd
  if data[(data['year'] &gt;= 2019) &amp; (data['year'] &lt; 2099)]:
      data['year'] = data['year'].str[:2].replace('20','19')
  </code></pre>
  
  <p>Not working with this script. </p>