title: shift values from another column python pandas to another column
body: <p>I am new to Python and facing and issue with the following:</p>
  
  <p>a) How do I shift right the values from Rank to Total with values from Rank to Bronze if the total containing <code>NAN</code> at column Total</p>
  
  <p>b) How to fill the missing value of Rank (After the shift value) to a value derived from the row above it.</p>
  
  <p>Issue:                      </p>
  
  <pre><code>    Rank    NOC Gold    Silver  Bronze  Total
  0   1   United States (USA) 46  37  38  121
  1   2   Argentina (ARG) 3   1   0   4
  2   3   Denmark (DEN)   2   6   7   15
  3   4   Sweden (SWE)    2   6   3   11
  4   5   South Africa (RSA)  2   6   2   10
  5   6   Sweden (SWE)    2   6   3   11
  **6 Tajikistan (TJK)    1   0   0   1   NaN**
  7   7   Malaysia (MAS)  0   4   1   5
  </code></pre>
  
  <p>Expected Outcome:                       </p>
  
  <pre><code>    Rank    NOC Gold    Silver  Bronze  Total
  [0  1   United States (USA) 46  37  38  121
  1   2   Argentina (ARG) 3   1   0   4
  2   3   Denmark (DEN)   2   6   7   15
  3   4   Sweden (SWE)    2   6   3   11
  4   5   South Africa (RSA)  2   6   2   10
  5   6   Sweden (SWE)    2   6   3   11
  **6 6   Tajikistan (TJK)    1   0   0   1**
  7   7   Malaysia (MAS)  0   4   1   5]
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/9DJM6.png" rel="nofollow noreferrer">1</a></p>