title: Striping trailing non numeric characters and last decimal/digit
body: <p>In my pandas data frame, there is a column labeled Android Ver. I have to strip the trailing non-numeric characters from all values (ie. the words &quot; and up&quot;), so the result is a number. If there are multiple decimal places (eg. &quot;x.y.z&quot;), keep only the first two parts (eg &quot;x.y&quot;). For example, the value &quot;4.1 and up&quot; should be changed to &quot;4.1&quot;. The value &quot;4.5.6 and up&quot; should be changed to &quot;4.5&quot;. The value &quot;5.6.7&quot; should be changed to &quot;5.6&quot;.</p>
  <p>It currently looks like this:</p>
  <pre><code>0        4.0.3 and up
  1        4.0.3 and up
  2        4.0.3 and up
  4          4.4 and up
  5          2.3 and up
               ...     
  10833      2.2 and up
  10834      4.1 and up
  10835      4.0 and up
  10836      4.1 and up
  10837      4.1 and up
  </code></pre>
  <p>But I need it to look like this:</p>
  <pre><code>0        4.0
  1        4.0
  2        4.0
  4          4.4
  5          2.3
               ...     
  10833      2.2
  10834      4.1
  10835      4.0
  10836      4.1
  10837      4.1
  </code></pre>
  <p>my code right now is this:</p>
  <pre><code>Googleapps_df.replace(r'[.\d a-zA-Z%]', '', regex=True, inplace=True)
  </code></pre>
  <p>But it is not working at all.</p>
  <p>What would be the best way to go about doing this?</p>