How to efficiently rename/shorten a lot of columns in pandas?
<p>I am looking for an efficient way of shortening/renaming column names in my dataframe. I have a lot of columns so doing it manually is not an option.
My data looks similar to this</p>

<pre><code>df.head(2):
            (spyhr, 10:00:00)  (spyhr, 11:00:00)  (spyhr, 12:00:00)  
date                                                                  
2009-02-20           0.004808          -0.003776          -0.004145   
2009-02-23          -0.007931          -0.015349          -0.002748

df.column.values:

array([('spyhr', datetime.time(10, 0)), ('spyhr', datetime.time(11, 0)),
       ('spyhr', datetime.time(12, 0))], dtype=object)
</code></pre>

<p>I would like my columns to be named like this: </p>

<pre><code>                     spyhr10             spyhr11           spyhr12
date                                                                  
2009-02-20           0.004808          -0.003776          -0.004145   
2009-02-23          -0.007931          -0.015349          -0.002748
</code></pre>