title: Replacing strings and sorting in pandas dataframe
body: <p>I'm trying to replace the strings in a pandas dataframe column, which is sucessful but I'm missing other rows, only the two modified strings with it's rows are kept in the DF. And one thing is left from there is to order the complete DF by the numbers from the third columns (Pos1, Pos3, Pos4)
  (see desired output).</p>
  <p>code:</p>
  <pre><code>df = pd.DataFrame({'1': [5614,4564,3314,3144,1214,4314],
          '2': ['banana','kiwi' ,'salsa','avocado','mix','juice'],
          '3': ['Pos1','Pos1','Pos3','Pos3','Pos1','Pos1']
          })
  
  df = df[4:5].replace('Pos1', 'Pos3') 
  # however this doesn't modify the original df but overwrites it with only two rows ( 1214   mix  Pos3, 4314 juice Pos3)
  
  
  # regarding to locate the integers from 3rd column: 
  for indx,row in df.iterrows():
       if row[3].isdigit() == True:
           #... sort_by(row[3]) 
           # but preserve the following order (check desired output)
  
  </code></pre>
  <pre><code>Dataframe
  
      1       2       3
  0   5614    banana  Pos1
  1   4564    kiwi    Pos4
  2   3314    salsa   Pos3
  3   3144    avocado Pos3
  4   1214    mix     Pos1
  5   4314    juice   Pos1
  
  
  Desired output:
  
      1       2       3
  0   5614    banana  Pos1
  1   3314    salsa   Pos3
  2   3144    avocado Pos3
  3   1214    mix     Pos3
  4   4314    juice   Pos3
  5   4564    kiwi    Pos4
  
  </code></pre>
  <p>Edited: order/sorting problem (doesn't preserve the exact order &quot;inside&quot;/group of Pos1's or Pos3's, but it'srather scattered)</p>
  <p>Picture:
  <a href="https://i.stack.imgur.com/cgeM1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cgeM1.png" alt="enter image description here" /></a></p>
  <p>If you look at the picture the very first 10 items should have the exact same order as it was from the very beginning, but even these aren't in order: it's shuffled. it should be: 0,1,2,3,4,5,6,7.. 10 but not 0,9,7,6,5,8,3,2,1 (these are all &quot;Pos1&quot;)</p>