This is a little hard to explain so bear with me please.
Assume I have a table, like below
How can I create a new dataframe, that matches criteria below
Has 5 rows, for each row, will be values from Column A that between a range, say that first row are between (200, 311), second row between (312, 370) etc.
Has 3 columns, for each column, will be values from Column B that between a range, say that first column are between (1, 16), second column between (17, 50) etc.
Value of each cell, will be sum of values from Column C which matches corresponding Column and Row.
Example:
Any illustration? Numbers are random, you don't need to follow my example.
Thanks a lot!
My solution was pre-define row criteria and column criteria in two lists, then run embedded loops to fill each cell value into new dataframe. It works and not that slow, but I am wondering since this is pandas dataframe, there should be a way doing so in query, without any loop.
Thanks again!

