title: How to use placeholders in a for loop?
body: <p>I have the following code:</p>
  
  <pre><code>df['Variable Name']=df['Variable Name'].replace(' 15 °',' at 15 °', regex=True)
  df['Variable Name']=df['Variable Name'].replace(' at at 15 °',' at 15 °', regex=True)
  df['Variable Name']=df['Variable Name'].replace(' 0 °',' at 0 °', regex=True)
  df['Variable Name']=df['Variable Name'].replace(' at at 0 °',' at 0 °', regex=True)
  df['Variable Name']=df['Variable Name'].replace(' 5 °',' at 5 °', regex=True)
  df['Variable Name']=df['Variable Name'].replace(' at at 5 °',' at 5 °', regex=True)
  </code></pre>
  
  <p>And would like to know how to shorten it. 
  I tried a for loop:</p>
  
  <pre><code>for x in range(0,15,5):
      df['Variable Name']=df['Variable Name'].replace(' %s °',' at %s °', x, regex=True)
      df['Variable Name']=df['Variable Name'].replace(' at at %s °',' at %s °', x, regex=True)
  </code></pre>
  
  <p>But I get the error message:</p>
  
  <pre><code>ValueError: For argument "inplace" expected type bool, received type int.
  </code></pre>
  
  <p>What's a better way to do it?</p>
  
  <p>Edit: Added snippet</p>
  
  <pre><code>Variable Name                          Condition
  Density 15 Â°C (g/mL)   
  Density 0 Â°C (g/mL)    
  Density 5 Â°C (g/mL)    
  Calculated API Gravity  
  Viscosity at 15 Â°C (mPa.s) 
  Viscosity at 0 Â°C (mPa.s)  
  Viscosity at 5 Â°C (mPa.s)  
  Surface tension 15 Â°C (oil - air)  
  Interfacial tension 15 Â°C (oil - water)    
  </code></pre>