I have below dataframe
import pandas as pd
import numpy as np
df = pd.DataFrame({
'val0': [-8.93, 1.68, 1.58, -1.2, 3.43, 4.25, 3.96, -0.52, -8.12, -5.05, -7.12, 11.99, 16.98, 17.15, 0.11, -7.32, -11.61, -12.22, -11.99, -8.37, -5.84, 1.09, -3.21, -1.42, -4.31, -1.18, 5.39, -7.01, -3.99, -9.08, 3.32, -1.48, -0.64, -1.09, -2.18, 0.32, -2.31, 1.32, -4.02, -4.11],
'val1' : [-1.0, 4.0, -193.0, -22.0, -193.0, 200.0, 63.0, 43.0, 5.0, 35.0, 40.0, -7.0, -20.0, -43.0, -50.0, -43.0, -20.0, 20.0, 40.0, 48.0, 22.0, 9.0, 11.0, 6.0, 55.0, -200.0, -52.0, -10.0, -5.0, 60.0, 135.0, 85.0, 75.0, 75.0, 90.0, -122.0, -62.0, -162.0, 122.0, 50.0],
})
how can I create a frequency table or a count table similar to the snap enclosed below.
I have shown some examples, for instance there is one entry that falls under 0-25 range for Val1 and 0 to -1.6 range for Val0. Likewise there are no entries that fall under 0-25 range for Val1 and -1.6 and -3.2 range for Val0. (I will of course need the entire table populated)
Also, as show below in another table I want to see the average value of Val0 for each category
average values for Val0

