The clip() function specifies a lower limit and upper limit. Values in the DataFrame exceeding the upper limit, are reduced to the upper limit and values under the lower limit are raised to this lower limit:
sales_df.clip(8, 3000)
The following is the output:
clip() result