title: Pandas Dataframe Transformations
body: <p>Consider a data frame which looks like:</p>
  
  <pre><code>             A        B        C
  0   2018-10-13      100       50
  1   2018-10-13      200       25
  2   2018-10-13      300       10
  3   2018-10-13      400        5
  4   2018-10-13      500        0
  5   2018-10-14      100      100
  6   2018-10-14      200       50
  7   2018-10-14      300       25
  8   2018-10-14      400       10
  9   2018-10-14      500        5
  10  2018-10-15      100      150
  11  2018-10-15      200      100
  12  2018-10-15      300       50
  13  2018-10-15      400       25
  14  2018-10-15      500       10
  </code></pre>
  
  <p>Here transformation that I want to perform is: </p>
  
  <ol>
  <li>GroupBy Column A</li>
  <li>Then GroupBy Column B into 3 intervals ( [0,100] say <strong>intval-1</strong>, [101,200] say <strong>intval-2</strong>, [201,end] say <strong>intval-3</strong>]. Can be n intervals to generalize.</li>
  <li>Perform sum aggregation on Column C</li>
  </ol>
  
  <p>So my transformed/pivoted dataframe should be like</p>
  
  <pre><code>             A  intval-1  intval-2  intval-3
  0   2018-10-13        50        25        15
  1   2018-10-14       100        50        40
  2   2018-10-13       150       100        85
  </code></pre>
  
  <p>An easy way to implement this would be great help. </p>
  
  <p>Thank You.</p>