Subdivide a numerical vector with a normal distribution
You seem to be describing the method cut in pandas (documentation)

This method does exactly what you want, if you want to separate a dataframe into n equal-sized bins or manually specify the ranges.

Example:

df = pd.DataFrame(np.array([10, 50, 99, 140, 250, 300, 450, 499]), columns=['price'])

bins = pd.IntervalIndex.from_tuples([(0, 100), (100, 300), (300, 500)])
df['price'] = pd.cut(df['price'], bins)


Output:



You can simply specify the number of bins you want: 

df = pd.DataFrame(np.array([10, 50, 99, 140, 250, 300, 450, 499]), columns=['price'])

df['price'] = pd.cut(df['price'], bins=3)


Output:



I hope this helps improve your code.