the DataFrame(input)
0 1.0 25.0
1 1.0 31.0
2 2.0 97.0
3 1.0 25.0
4 1.0 26.0
output
I want to get an array that has indexes from 1 up to and including 97 that says each index was how many times in intervals for example 1 was in 4 intervals(first two and last two intervals), 3 was in 5 intervals, 96 was just in 1 interval. note that I can not use a loop and I have to do it with array operations(numpy, pandas).
I want to get something like:
1 4
2 5
3 5
.
.
.
25 5
26 3
27 2
28 2
29 2
30 2
31 2
32 1
33 1
34 1
.
.
.
97 1