title: How to remove alphabet from float values in dataframe column
body: <p>I have a dataframe :</p>
  
  <pre><code>A            B
  10.1        33.3
  11.2        44.2s
  12.3        11.3s
  14.2s       *
  15.4s       nan
  </code></pre>
  
  <p>i want output as </p>
  
  <pre><code>A            B
  10.1        33.3
  11.2        44.2
  12.3        11.3
  14.2          0
  15.4         0
  </code></pre>
  
  <p>How do I remove these tailing alphabets </p>
  
  <p>I have tried this code </p>
  
  <p>1st approach: </p>
  
  <pre><code>bulb_temp_df['A'].str.extract('(\d)').astype(float)
  bulb_temp_df['B'].str.extract('(\d)').astype(float)
  </code></pre>
  
  <p>2nd approach:</p>
  
  <pre><code>bulb_temp_df['A'] = 
  bulb_temp_df['A'].astype(str)
  bulb_temp_df['A'] = 
  bulb_temp_df['A'].map(lambda x: x.rstrip('aAbBcC'))
  </code></pre>
  
  <p>These are not working. They are not removing the tailing s from the columns. </p>
  
  <p>third approach </p>
  
  <pre><code>bulb_temp_df[cols]=bulb_temp_df[cols].apply(lambda x:x.str.extract('(\d+\.\d+)',expand=False)
                                  .astype(float)
                                  .fillna(0))`
  </code></pre>
  
  <p>All these are not working. The last one removes the tailing s but it converts the values without 's' to zero or nan. </p>