title: Modify pandas dataframe within iterrows loop
body: <p>I'm new to Python.</p>
  
  <p>I am trying to add prefix (Serial number) to an element within a data frame using for loop, to do with data cleaning/preparation before analysis.</p>
  
  <p>The code is</p>
  
  <pre><code>a=pd.read_excel('C:/Users/HP/Desktop/WFH/PowerBI/CMM data.xlsx','CMM_unclean')
  a['Serial Number'] = a['Serial Number'].apply(str)
  print(a.iloc[72,1])
  
  for index,row in a.iterrows():
      if len(row['Serial Number']) == 6:
          row['Serial Number'] = 'SR0' + row['Serial Number']
          print(row['Serial Number'])
  
  print(a.iloc[72,1])
  </code></pre>
  
  <p>The output is</p>
  
  <pre><code>C:\Users\HP\anaconda3\envs\test\python.exe C:/Users/HP/PycharmProjects/test/first.py
  101306
  SR0101306
  101306
  </code></pre>
  
  <p>I don't understand why this is happening inside the for loop, value is changing, however outside it is the same.</p>