Removing irrelevant content in columns
Since you had not provided the tag on which language you are using. I am providing a sample solution in python with pandas for loading the data and transforming.

&gt;&gt; import pandas as pd
&gt;&gt; sample = pd.DataFrame({'a': ['1 inch', '2 meters', '1 metre', '2.5 inches', '2.8 meters']})
            a
0      1 inch
1    2 meters
2     1 metre
3  2.5 inches
4  2.8 meters
&gt;&gt; def get_number(a):
       for _ in a.split(' '):
           try:
               return float(_.strip())
           except ValueError:
               pass
&gt;&gt; m['b'] = m['a'].apply(lambda a: get_number(a) * 0.0254 if 'inch' in a else get_number(a))
&gt;&gt; m
              a       b
  0      1 inch  0.0254
  1    2 meters  2.0000
  2     1 metre  1.0000
  3  2.5 inches  0.0635
  4  2.8 meters  2.8000


Hope this gives you a general idea of how to do it.