pengaturan harga harga dalam 3 kategori python

item_sale_avg['Price Category'] = np.where(item_sale_avg.Sales <= 500, 'low', 
                                  np.where(item_sale_avg.Sales >= 1500, 'high', 'medium'))

print (item_sale_avg)
   Sales Price Category
0    100            low
1    500            low
2    600         medium
3   1500           high
4   2000           high
Thankful Toad