title: Selecting columns with startswith in pandas
body: <p>Hi I have a data and I want to rename one of the column and select columns starts with <code>t</code> string.   </p>
  
  <pre><code>raw_data = {'patient': [1, 1, 1, 2, 2],
          'obs': [1, 2, 3, 1, 2],
          'treatment': [0, 1, 0, 1, 0],
          'score': ['strong', 'weak', 'normal', 'weak', 'strong'],    
          'tr': [1,2,3,4,5],
          'tk': [6,7,8,9,10],
          'ak': [11,12,13,14,15]
  
          }
  df = pd.DataFrame(raw_data, columns = ['patient', 'obs', 'treatment', 'score','tr','tk','ak'])
  
  df
  
     patient  obs  treatment   score  tr  tk  ak
  0        1    1          0  strong   1   6  11
  1        1    2          1    weak   2   7  12
  2        1    3          0  normal   3   8  13
  3        2    1          1    weak   4   9  14
  4        2    2          0  strong   5  10  15
  </code></pre>
  
  <p>So I tried by following <a href="https://stackoverflow.com/questions/55301856/python-pandas-renaming-column-name-startswith">python-pandas-renaming-column-name-startswith</a></p>
  
  <pre><code>df.rename(columns = {'treatment':'treat'})[['score','obs',df[df.columns[pd.Series(df.columns).str.startswith('t')]]]]
  </code></pre>
  
  <p>but getting this error</p>
  
  <blockquote>
    <p>TypeError: 'DataFrame' objects are mutable, thus they cannot be hashed</p>
  </blockquote>
  
  <p>How can I select the columns that starts with <code>t</code> ?</p>
  
  <p>Thx</p>