Hi how’s it going?
I want to set a ceiling value to a column in my dataframe so that every value greater than 1.0 is equal to 1.0, everything else remains untouched.
What’s the easiest way to do this?
Hi how’s it going?
I want to set a ceiling value to a column in my dataframe so that every value greater than 1.0 is equal to 1.0, everything else remains untouched.
What’s the easiest way to do this?
The function clamp
will do this.
julia> x = randn(1000);
julia> clamp.(x, -Inf, 1)
There is also a modifying clamp!
that modifies the vector.
thank you!