I have a column in a pandas dataframe and I want to take all the numbers below 15,000 and either round them to 15,000 or 0.
I want to do the same with numbers above 200,000 and round them down to 200,000.
For rounding, .round() takes it to a number of significant figures and math.ceil()/.floor() take the numbers to the nearest integer but neither of these solve my problem on their own.
I assume there is some clever maths trick or a function I don't see.
Example:
Column_to_Round Rounded_Column
11000 15000
9000 15000
3000 0
5000 0
16000 16000
220000 200000
199000 199000