title: Pandas: how to apply function to column names
body: <p>I would like all columns to be named in a uniform manner, like:</p>
  
  <pre><code>Last Name -&gt; LAST_NAME
  e-mail -&gt; E_MAIL
  ZIP code 2 -&gt; ZIP_CODE_2
  </code></pre>
  
  <p>For that purpose I wrote a function that uppercases all symbols, keeps digits and replaces rest of the characters with underscore (<code>'_'</code>). Then it replaces multiple underscores with just one and trims underscores at both ends.</p>
  
  <p>How do I apply this function (lambda) to the column names in <em>Pandas</em>?</p>