title: in Pandas, how to do string cleaning on all columns in a data frame
body: <p>I have a data frame with many columns, some are objects including texts. I want to do some cleaning on all of the text columns like lower(), strip() etc. How can I get it by a loop over all text columns?</p>
  
  <p>I have written this which works as I expect:</p>
  
  <pre><code>for column in t1.loc[:, t1.dtypes == np.object].columns:
      t1.loc[:,column] = t1[column].str.lower().str.strip()
  </code></pre>
  
  <p>I was just wondering if there is a better way to write this. I am trying to improve my skills in pandas.</p>