title: How to replace specific digits in column using python pandas.
body: <p>How can I replace the specific digits in columns of pandas data frame without affecting other characters? I have a large csv file which is something similar like this:</p>
  <pre><code>data = pd.read_csv(&quot;meter.csv&quot;)
  data.head()
  Out[10]:
       value  temp1  temp2
  0   34 02:0   16.0     17 
  1   36 06:0    8.0     27
  2   28 10:0   18.0     21
  3   34 02:0   16.0     17 
  4   36 06:0    8.0     27
  5   28 10:0   18.0     21
  6   34 02:0   16.0     17 
  7   36 06:0    8.0     27
  8   28 10:0   18.0     21
  </code></pre>
  <p>I want to replace <code>value</code> column values if <code>value.str[3:5] == 10</code> with <code>00</code></p>
  <p>Output that I need:</p>
  <pre><code>     value  temp1  temp2
  0   34 02:0   16.0     17 
  1   36 06:0    8.0     27
  2   28 00:0   18.0     21
  3   34 02:0   16.0     17 
  4   36 06:0    8.0     27
  5   28 00:0   18.0     21
  6   34 02:0   16.0     17 
  7   36 06:0    8.0     27
  8   28 00:0   18.0     21
  </code></pre>
  <p>I tried with using <code>pd.str.replace</code> reference:<a href="https://pandas.pydata.org/pandas-docs/version/0.23/generated/pandas.Series.str.replace.html" rel="nofollow noreferrer">pandas.Series.str.replace</a>. but could not able to achieve it.</p>
  <p>My code: <code>data['value'] = data['value'].str[3:5].replace('10','00')</code> and this gives output:</p>
  <pre><code>   value  temp1  temp2
  0   02   16.0     17 
  1   06    8.0     27
  2   00   18.0     21
  3   02   16.0     17 
  4   06    8.0     27
  5   00   18.0     21
  </code></pre>
  <p>It is replacing entire values with new value. Could anyone help me to solve this.
  Thanks!</p>