title: How to roundoff float (decimal) values in pandas dataframe that have mixed data types?
body: <p>In the following pandas dataframe:</p>
  
  <pre><code>df = 
  
  contig  pos ref haplotype_block hap_X   hap_Y   odds_ratio  My_hap  Sp_hap
  2   2969    C   3706    T   C   0.013000000000000001    C   T
  2   3222    G   3706    G   C   -   C   G
  2   3416    G   3706    A   G   -   G   A
  2   5207    T   1856    T   A   167.922 T   A
  2   5238    G   1856    C   G   -   C   G
  2   5398    A   1856    A   G   -   A   G
  2   5403    A   1856    A   G   -   A   G
  2   5426    C   1856    C   A   -   C   A
  </code></pre>
  
  <p>I want to roundoff the values in the <code>odds_ratio</code> column. But, some of the data in that column are strings. So I tried using lambda</p>
  
  <pre><code>df['odds_ratio'] = df['odds_ratio'].astype(float).round(3)
  </code></pre>
  
  <p>But, I am getting the error message that some of the values (<code>-</code>) is string.</p>