title: How to perform multiple pandas data type changes on different columns with one function?
body: <p>I have 41 columns in a dataframe, out of those 22 I want to change the data type to 'str' except 1 column I want to change to 'float'. </p>
  
  <p>Currently, I am doing this line of code to change individual columns to the datatype str or float, now doing this to 20 other columns:</p>
  
  <pre><code>df.active  = df.active.astype(str)
  df.total_spent = df.total_spent.astype(float)
  </code></pre>
  
  <p>How do I write a function that takes the columns I want to make into string and the one column above that I want as a float? </p>
  
  <p>Let me know if you would like the list of columns, I thought it would be too much for now.</p>
  
  <p>Thank you in advance. </p>