polars.Series.clip_max#
- Series.clip_max(upper_bound: int | float) Series [source]#
Clip (limit) the values in an array to a max boundary.
Only works for numerical types.
If you want to clip other dtypes, consider writing a “when, then, otherwise” expression. See
when()
for more information.- Parameters:
- upper_bound
Upper bound.