title: How to convert all float64 columns to float32 in Pandas?
body: <p>Is there a generic way to convert all float64 values in a pandas dataframe to float32 values? But not changing uint16 to float32? I don't know the signal names in advance but just want to have no float64.</p>
  <p>Something like:</p>
  <pre><code>if float64, then convert to float32, else nothing?
  </code></pre>
  <p>The structure of the data is:</p>
  <pre><code>DF.dtypes
  
  Counter               uint16
  p_007                 float64
  p_006                 float64
  p_005                 float64
  p_004                 float64
  </code></pre>