title: pandas element wise conditional return index
body: <p>I want to find  abnormal values and replace them with corresponding day of next week.</p>
  
  <pre><code>year    week    day  v1   v2
  2001    1         1  46   9999
  2001    1         2  60   9335
  2001    1         3 9999  9318
  2001    1         4  47   9999
  2001    1         5  57   9373
  2001    1         6  9999 9384
  2001    1         7  72   9444
  2001    2         1  75    73
  2001    2         2  74    63
  2001    2         3  79    377
  2001    2         4  70    361
  2001    2         5  75    73
  2001    2         6  77    64
  2001    2         7  76    57
  </code></pre>
  
  <p>I could carry out column by column,code as follows:</p>
  
  <pre><code>index_row=df[df['v1']==9999].index
  for i in index_row:
      df['v1'][i]=df['v1'][i+7]   # i+7 is the index of next week
  </code></pre>
  
  <p>How to element-wise the whole dataframe? Such as <code>pd.applymap</code>.
  How get the columns number(name) and row number base on conditional seiving values?</p>
  
  <p>The target df I want as follows:
  ( <code>*</code> indicated modified values and the next week values)</p>
  
  <pre><code>year    week    day  v1   v2
  2001    1         1  46   *73
  2001    1         2  60   9335
  2001    1         3  *79   9318
  2001    1         4  47   *361
  2001    1         5  57    9373
  2001    1         6  *77   9384
  2001    1         7  72    9444
  2001    2         1  75    *73
  2001    2         2  74    63
  2001    2         3  *79   377
  2001    2         4  70    *361
  2001    2         5  75    73
  2001    2         6  *77   64
  2001    2         7  76    57
  </code></pre>