I have following data:
item Date weights
1 camera 2018-01-05 1.0000
2 laptop 2018-01-05 1.0000
3 laptop 2018-01-05 1.0000
4 computer 2018-01-05 1.0000
5 mobile 2017-12-25 0.9000
6 mobile 2017-12-25 0.9000
7 camera 2017-12-25 0.9000
8 camera 2017-12-25 0.9000
9 mobile 2017-12-15 0.8100
10 mobile 2017-12-15 0.8100
11 mobile 2017-12-15 0.8100
12 mobile 2017-12-15 0.8100
13 camera 2017-12-10 0.7290
14 camera 2017-12-05 0.6561
I want to fetch the frequency of item on the basis of weight
:
For example:
for Camera
frequency on the basis of weight
should be:
(1+.9+.9+.729+.6561)/14