title: How to create new columns of last 5 sale price off in dataframe
body: <p>I have a pandas data frame of sneakers sale, which looks like this,
  <a href="https://i.stack.imgur.com/ojDBt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ojDBt.png" alt="enter image description here" /></a></p>
  <p>I added columns last1, ..., last5 indicating the last 5 sale prices of the sneakers and made them all None. I'm trying to update the values of these new columns using the 'Sale Price' column. This is my attempt to do so,</p>
  <pre><code>for index, row in df.iterrows():
      if (index==0):
          continue
      for i in range(index-1, -1, -1):
          if df['Sneaker Name'][index] == df['Sneaker Name'][i]:
              df['last5'][index] = df['last4'][i]
              df['last4'][index] = df['last3'][i]
              df['last3'][index] = df['last2'][i]
              df['last2'][index] = df['last1'][i]
              df['last1'][index] = df['Sale Price'][i]
              continue
      if (index == 100):
          break
  </code></pre>
  <p>When I ran this, I got a warning,
  <code>A value is trying to be set on a copy of a slice from a DataFrame</code></p>
  <p>and the result is also wrong.
  Does anyone know what I did wrong?</p>
  <p>Also, this is the expected output,
  <a href="https://i.stack.imgur.com/YhNv3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YhNv3.png" alt="enter image description here" /></a></p>