from sklearn.feature_selection import VarianceThreshold sel = VarianceThreshold(threshold=(0.95 * (1 - 0.95))) sel_=sel.fit_transform(features)