from sklearn.feature_selection.variance_threshold import VarianceThresholddef var(): VAR = VarianceThreshold(threshold=3.0) data = VAR.fit_transform([[0,2,0,3],[0,1,4,3],[0,1,1,3]]); print(data) return None;if __name__ == "__main__": var()结果截图: