I have a dataframe with id, value, missing values(this is a %age). I then want to have another column that has range that if the missing value is
- <=25 then it should return 1
- <=50 return 2
- <=75 return 3
- <=80 return 4
What best way can i do this
example of dataframe
df = pd.DataFrame({
'id': ['1245', '1323', '1784', '1557','1456'],
'value': [11558522, 12323552, 13770958, 18412280, 13770958],
'missing value': [34, 56, 80, 5 76]
})