title: Pandas: Replace/ Change Duplicate values within a Time Range
body: <p>I have a pandas data-frame where I am trying to replace/ change the duplicate values to 0 (don't want to delete the values) within a certain range of days. </p>
  
  <p>So, in example given below, I want to replace duplicate values in all columns with 0 within a range of let's say 3 (the number can be changed) days. Desired result is also given below </p>
  
  <pre><code>              A   B  C
  
  01-01-2011   2   10  0
  01-02-2011   2   12  2
  01-03-2011   2   10  0
  01-04-2011   3   11  3
  01-05-2011   5   15  0
  01-06-2011   5   23  1
  01-07-2011   4   21  4
  01-08-2011   2   21  5
  01-09-2011   1   11  0
  </code></pre>
  
  <p>So, the output should look like</p>
  
  <pre><code>              A   B  C
  
  01-01-2011   2   10  0
  01-02-2011   0   12  2
  01-03-2011   0   0   0
  01-04-2011   3   11  3
  01-05-2011   5   15  0
  01-06-2011   0   23  1
  01-07-2011   4   21  4
  01-08-2011   2   0   5
  01-09-2011   1   11  0
  </code></pre>
  
  <p>Any help will be appreciated. </p>