I have a df['values'] column which I would like to score between 0 and 1. The range is scored with 2 seperate upper and lower limts.
- lower/upper limit of 20/0
- lower/upper limit of 0/30
Is there a function on python for this operation? minmaxscalar does not allow me to set upper and lower bounds.
Input is df['values']
Desired output is df['score']
values score(20/0) score(0/30)
-5.1 1.00 0.00
3.6 0.82 0.12
6.6 0.67 0.22
9.0 0.55 0.30
21.0 0.00 0.70