title: Summing dataframe over combinations of index columns
body: <p>I have a dataframe with different sections (only 2 sections and speeds here, but a circuit can be up to 8 sections and 6 measured speeds) like so:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>section</th>
  <th>speed</th>
  <th>Data1</th>
  <th>Data2</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>A</td>
  <td>10</td>
  <td>1.5</td>
  <td>2.5</td>
  </tr>
  <tr>
  <td>A</td>
  <td>20</td>
  <td>1.0</td>
  <td>2.0</td>
  </tr>
  <tr>
  <td>B</td>
  <td>10</td>
  <td>2.5</td>
  <td>3.5</td>
  </tr>
  <tr>
  <td>B</td>
  <td>20</td>
  <td>2.0</td>
  <td>3.0</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I would like to sum my data columns over all possible circuits</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>A</th>
  <th>B</th>
  <th>Data1</th>
  <th>Data2</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>10</td>
  <td>10</td>
  <td>4.0</td>
  <td>6.0</td>
  </tr>
  <tr>
  <td>10</td>
  <td>20</td>
  <td>3.5</td>
  <td>5.5</td>
  </tr>
  <tr>
  <td>20</td>
  <td>10</td>
  <td>3.5</td>
  <td>5.5</td>
  </tr>
  <tr>
  <td>20</td>
  <td>20</td>
  <td>3.0</td>
  <td>5.0</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>How would I do this?  I can make the combinations, but not sure how to sum the data columns over them.</p>