I have a set of values as :-
1.2
1.0
2.6
2.4
2.8
5.1
2.5
5.4
1.3
1.1
10.3
4.1
3.4
3.2
6.1
6.3
9.0
8.6
7.1
3.2
4.3
15.0
12.3
13.1
17.4
10.2
11.7
14.6
16.3
Now, how can i bin them into groups such that the decimal values will go to the nearest integer value and give the no of its occurrence. ie.,say if value is 1.2 it should go to 1.0 and if value is 8.6 it should go to 9 (its nearest integer).
and i want the output as:-
0.0 - 1.0 its occurrence
1.1 - 2.0 its occurrence
2.1 - 3.0 its occurrence
3.1 - 4.0 its occurrence
4.1 - 5.0 its occurrence
16.1 - 17.0 its occurrence
and hence i can get the bins as x axis and its no.of times of occurrence on y axis and hence plot the graph. How can i write a python program for this..??