title: python pandas selecting columns from a dataframe via a list of column names
body: <p>I have a dataframe with a lot of columns in it. Now I want to select only certain columns. I have saved all the names of the columns that I want to select into a Python list and now I want to filter my dataframe according to this list. </p>
  
  <p>I've been trying to do:</p>
  
  <pre><code>df_new = df[[list]]
  </code></pre>
  
  <p>where list includes all the column names that I want to select.</p>
  
  <p>However I get the error:</p>
  
  <pre><code>TypeError: unhashable type: 'list'
  </code></pre>
  
  <p>Any help on this one?</p>