def clip(self, lower: Union[(float, int)]=None, upper: Union[(float, int)]=None) -> 'DataFrame':
    '\n        Trim values at input threshold(s).\n\n        Assigns values outside boundary to boundary values.\n\n        Parameters\n        ----------\n        lower : float or int, default None\n            Minimum threshold value. All values below this threshold will be set to it.\n        upper : float or int, default None\n            Maximum threshold value. All values above this threshold will be set to it.\n\n        Returns\n        -------\n        DataFrame\n            DataFrame with the values outside the clip boundaries replaced.\n\n        Examples\n        --------\n        >>> ps.DataFrame({\'A\': [0, 2, 4]}).clip(1, 3)\n           A\n        0  1\n        1  2\n        2  3\n\n        Notes\n        -----\n        One difference between this implementation and pandas is that running\n        pd.DataFrame({\'A\': [\'a\', \'b\']}).clip(0, 1) will crash with "TypeError: \'<=\' not supported\n        between instances of \'str\' and \'int\'" while ps.DataFrame({\'A\': [\'a\', \'b\']}).clip(0, 1)\n        will output the original DataFrame, simply ignoring the incompatible types.\n        '
    if (is_list_like(lower) or is_list_like(upper)):
        raise TypeError(("List-like value are not supported for 'lower' and 'upper' at the " + 'moment'))
    if ((lower is None) and (upper is None)):
        return self
    return self._apply_series_op((lambda psser: psser.clip(lower=lower, upper=upper)))
Trim values at input threshold(s).

Assigns values outside boundary to boundary values.

Parameters
----------
lower : float or int, default None
    Minimum threshold value. All values below this threshold will be set to it.
upper : float or int, default None
    Maximum threshold value. All values above this threshold will be set to it.

Returns
-------
DataFrame
    DataFrame with the values outside the clip boundaries replaced.

Examples
--------
>>> ps.DataFrame({'A': [0, 2, 4]}).clip(1, 3)
   A
0  1
1  2
2  3

Notes
-----
One difference between this implementation and pandas is that running
pd.DataFrame({'A': ['a', 'b']}).clip(0, 1) will crash with "TypeError: '<=' not supported
between instances of 'str' and 'int'" while ps.DataFrame({'A': ['a', 'b']}).clip(0, 1)
will output the original DataFrame, simply ignoring the incompatible types.
def clip(self, lower: Union[(float, int)]=None, upper: Union[(float, int)]=None) -> 'DataFrame':
    '\n        Trim values at input threshold(s).\n\n        Assigns values outside boundary to boundary values.\n\n        Parameters\n        ----------\n        lower : float or int, default None\n            Minimum threshold value. All values below this threshold will be set to it.\n        upper : float or int, default None\n            Maximum threshold value. All values above this threshold will be set to it.\n\n        Returns\n        -------\n        DataFrame\n            DataFrame with the values outside the clip boundaries replaced.\n\n        Examples\n        --------\n        >>> ps.DataFrame({\'A\': [0, 2, 4]}).clip(1, 3)\n           A\n        0  1\n        1  2\n        2  3\n\n        Notes\n        -----\n        One difference between this implementation and pandas is that running\n        pd.DataFrame({\'A\': [\'a\', \'b\']}).clip(0, 1) will crash with "TypeError: \'<=\' not supported\n        between instances of \'str\' and \'int\'" while ps.DataFrame({\'A\': [\'a\', \'b\']}).clip(0, 1)\n        will output the original DataFrame, simply ignoring the incompatible types.\n        '
    if (is_list_like(lower) or is_list_like(upper)):
        raise TypeError(("List-like value are not supported for 'lower' and 'upper' at the " + 'moment'))
    if ((lower is None) and (upper is None)):
        return self
    return self._apply_series_op((lambda psser: psser.clip(lower=lower, upper=upper)))