def outlier(df, method = "forest", poutlier = 0.025, sd = 3.5, iqr = 1.5, indicate = True, n_estimators = 100):
    x = copy(df)
    if "for" in method or "tree" in method:
        from sklearn.ensemble import IsolationForest
        df = dummies(x, na = "clear");       df = df.fillna(df[nullcol].median())
        model = IsolationForest(n_estimators = n_estimators, n_jobs=-1, bootstrap = True, contamination = poutlier)
        model.fit(df);            preds = model.predict(df)
        res = x.iloc[np.where(preds==-1)[0]]
    else:
        f = dummies(x, na = "clear");            df = topositive(f.fillna(f.median()))
        if "std" in method or "sd" in method:
            #https://stackoverflow.com/questions/22354094/pythonic-way-of-detecting-outliers-in-one-dimensional-observation-data
            if len(shape(df)) == 1: df = df[:,None]
            df = unskew(df)
            meds = median(df, axis=0)
            diff = sum((df - meds)**2, axis=1)
            diff = sqrt(diff);            mad = median(diff)
            z = 0.6745 * diff / mad
            out = (z>sd)==True
            where = out.index[out].tolist()
            res = x.iloc[where]

        elif "iqr" in method:
            first = percentile(df, p = 0.25)
            last = percentile(df, p = 0.75)
            iqrred = first-last
            where = sum((df>(last+iqr*last))|(df<(first-iqr*first)))!=0
            res = x.iloc[where.index[where].tolist()]