title: Sum of all columns except the ones specified in a list in Python
body: <p>I have the below data for each ID:</p>
  
  <pre><code>id  ----    Base    AE      Val     LT  RO+ Prem    AM  TN  T3  AR
  05  0       34.34   9.42    70.68   0   0   0   0   0   0   0
  108 0       43.77   0       28      0   0   0   0   0   0   0
  205 0       77.64   0       32.2    0   0   0   0   0   0   0
  320 0       66.24   0       59.628  0   0   0   0   0   0   0
  313 0       21.66   0       21.442  0   0   0   0   0   0   0
  324 0       72.37   0       701.12  0   0   0   0   0   0   0
  505 0       76.057  0       43.87   0   0   0   0   0   0   0
  </code></pre>
  
  <p>Now I want to find the sum of all columns except a few which I specify and the others separately into a column like below:</p>
  
  <pre><code>id  Base    Val     Others  Total
  05  34.34   70.68   9.42    114.441387
  108 43.77   28      0       71.77
  205 77.64   32.2    0       109.84
  320 66.24   59.628  0       125.868
  313 21.66   21.442  0       43.102
  324 72.37   701.12  0       773.49
  505 76.057  43.87   0       119.927
  </code></pre>
  
  <p>So if my list of columns to keep:</p>
  
  <pre><code>cols_to_keep = ['Base','Val']
  </code></pre>
  
  <p>The other channels which are not part of this list,are to be summed up in Others Column and all the values in each row sum to Total.
  id is the index of the records.</p>
  
  <p>I am able to keep the columns I declare in the list, but how to sum up the other columns except in the list in the Others column.
  Can someone please help me with this?
  The data is in a pandas df.</p>