I would like to change values in a column based on its range, how should I do it?
here is a sample dataset
Id    Number
0      2
1      2
2      2
3      2
4     23
5      6
6     16
7     10
8     15
9      8
10     6
11     9
12     1
Here is the range:
   if number >=6 and <12 then 1
   if number ==12, then 2
   if number >=13 and <=17, then 3
   if number >17 and <=22 then 4
   else 5
How should I do it?
 
    