28. Sum over Integer Bins

Hard

Build df with pd.DataFrame(np.random.RandomState(8765).randint(1, 101, size=(100, 2)), columns=['A', 'B']). Bucket the rows by which range of 10 their 'A' value falls into — (0,10], (10,20], …, up to (90,100] — and return the sum of the corresponding 'B' values for each bucket, indexed by the bucket interval.

Implement solve(...)