I have data in two lists of value and frequency like this:
value freq
12
2 1
3 3
6 2
7 3
8 3
....
and I want the result to be
bin freq
1-3 6
4-6 2
7-9 6
...
I can write a few lines of code to do this. However, I am looking to see if there are builitin functions in standard python or Numpy? I found a solution when you are given data in an array / list with repetition, i.e. They have not yet been grouped into a frequency table (for example, d= [1,1,2,3,3,3,6,6,7,7,7,8,8,8,...] . However, in this case I couldnβt find the answers.I donβt want to convert mine first enter the data in one extended list, for example d , and use the histogram function.
source share