def trimtail(data, proportiontocut=0.2, tail='left', inclusive=(True,True),
             axis=None):
    tail = str(tail).lower()[0]
    if tail == 'l':
        limits = (proportiontocut,None)
    elif tail == 'r':
        limits = (None, proportiontocut)
    else:
        raise TypeError("The tail argument should be in ('left','right')")

    return trimr(data, limits=limits, axis=axis, inclusive=inclusive)
Trims the data by masking values from one tail.
dataset/ETHPy150Open scipy/scipy/scipy/stats/mstats_basic.py/trimtail