title: Machine Learning Data Cleaning: Removing unit of a value from a pandas dataframe
body: <p>I am practicing data cleaning on a dataset. It has one of the attribute 'mileage' which has value ending with unit 'km/kg' or 'kmpl' (eg : 23.4 kmpl , 17.3 km/kg).</p>
  <p>To covert to numeric I used the code</p>
  <pre><code>df['mileage'] = df['mileage'].str.replace('kmpl','')
  </code></pre>
  <p>The above code works and it removes 'kmpl' but when I tried to remove 'km/kg' by replacing 'kmpl' with 'km/kg' it's not working. Neither it shows any error.</p>
  <p>Can anyone suggest why this happens so? Any help is appreciated.</p>