EAPExprNamespace.winsorize

eap_pl.EAPExprNamespace.winsorize(
    prob=0.01,
    p_low=None,
    p_high=None,
    *,
    quantile_method='type2',
)

Clip values to percentile cutoffs.

Parameters

Name Type Description Default
prob float | None Tail probability. The cutoffs are prob and 1 - prob. Use None with an explicit probability for one-sided clipping. 0.01
p_low float | None Override the lower cutoff probability. None
p_high float | None Override the upper cutoff probability. None
quantile_method str "type2" (the default) uses the existing era_pl calculation. "linear" uses Polars’ linear interpolation. See EAPExprNamespace.quantile() for the additional StatsPAI and NumPy method names, including the separate "r" and "stata" rules. 'type2'

Returns

Name Type Description
polars.Expr Values clipped to the requested cutoffs.