We want you to add an extra method, quantile_clip, to pandas.Series and pandas.DataFrame.
quantile_clip has a couple of modes:
my_series.quantile_clip(lower=0.02)
clip the lowest 2% of values up to the 2%ile value.my_series.quantile_clip(upper=0.98)
clip the highest 98% of values down to the 98%ile value.my_series.quantile_clip(lower=0.02, upper=0.98)
do both.
This problem asks you to implement a new `quantile_clip` method for `pandas.Series` and `pandas.DataFrame`. The method clips values based on quantile thresholds: a lower bound raises small values up to the chosen quantile, an upper bound caps large values down to the chosen quantile, and supplying both performs both operations. The core idea is quantile computation plus element-wise clipping.